Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasional segfaults deep in glibc when execing? #2392

Closed
amluto opened this issue Sep 16, 2015 · 9 comments
Closed

Occasional segfaults deep in glibc when execing? #2392

amluto opened this issue Sep 16, 2015 · 9 comments
Assignees
Milestone

Comments

@amluto
Copy link
Contributor

amluto commented Sep 16, 2015

I'm seeing various abrt reports that generally look like Fedora bug 1263052, which is the first one I've gotten since updating Fedora's package to fish 2.2.0.

My current best guess is that the iothread_drain_all hack isn't working right.

@amluto
Copy link
Contributor Author

amluto commented Sep 16, 2015

More info. We're blowing up here in exec_job here:

                            bool builtin_io_done = do_builtin_io(outbuff.data(), outbuff.size(), errbuff.data(), errbuff.size());
                            if (! builtin_io_done)
                            {
                                show_stackframe();
                            }

Something terrible is happening that causes show_stackframe() to segfault, in fprintf, but something must have already gone wrong before that. As a wild guess, if write_loop fails due to EPIPE, bad things will happen.

Also, shouldn't show_stackframe use write_loop instead of fwprintf?

@amluto
Copy link
Contributor Author

amluto commented Sep 16, 2015

I bet I'm right. The open file descriptors were:

0:/dev/pts/5 (deleted)
pos:    0
flags:  0100002
mnt_id: 22

1:/dev/pts/5 (deleted)
pos:    0
flags:  0100002
mnt_id: 22

2:/dev/pts/5 (deleted)
pos:    0
flags:  0100002
mnt_id: 22

(and some more, stripped for brevity)

@ridiculousfish
Copy link
Member

What is suspicious about those open file descriptors? That looks OK to me, except for (deleted) which I don't understand (what do those mean?)

@amluto
Copy link
Contributor Author

amluto commented Sep 16, 2015

I assume it means that the pty master (terminal) is gone.

@amluto
Copy link
Contributor Author

amluto commented Sep 16, 2015

See #2393 for a possible fix

@amluto
Copy link
Contributor Author

amluto commented Sep 24, 2015

I'm submitting Fedora updates-testing builds with these patch, and I'll ask the original reporter to test.

@ridiculousfish ridiculousfish self-assigned this Sep 24, 2015
@ridiculousfish
Copy link
Member

Assigning to me to remind myself to review this

@amluto
Copy link
Contributor Author

amluto commented Sep 25, 2015

FWIW, this is now in Fedora's updates-testing, so it should get some test coverage over the next few days.

@faho
Copy link
Member

faho commented Dec 10, 2015

Fixed by merging #2393.

@faho faho closed this as completed Dec 10, 2015
@zanchey zanchey added this to the next-2.x milestone Dec 17, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants