Segfault when backgrounding process or on system suspend/resume

Bug #1263808 reported by Danny Guinther on 2013-12-24
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
beanstalkd (Ubuntu)
Undecided
Unassigned

Bug Description

beanstalkd 1.9 segfaults whenever it is run in the foreground and backgrounded with CTRL-Z then returned to the foreground with fg. It also segfaults when run as a daemon and the system resumes from being suspended.

The problem is with beanstalkd, not with Ubuntu. This bug was introduced here: https://github.com/kr/beanstalkd/commit/e284badf079db519db8fdd2e86959f2ee17240be

I've submitted a patch for this issue, but master hasn't been updated in ~6 months, so I wouldn't count on it getting merged soon. The patch is very minimal and can be found here: https://github.com/kr/beanstalkd/pull/221. I've also attached a diff to this bug report.

Beyond the example cases I mentioned above, the truth of the bug is that beanstalkd will crash anytime epoll_wait returns EINTR to beanstalkd. I don't know a lot about epoll_wait, so I can't say when else that would be an issue.

I've tested that this issue exists when beanstalkd 1.9 is built on Precise and the issue exists with the package available with Trusty. The package version of beanstalkd on Precise does not segfault.

I don't know if it's something particular to the Trusty build, but beanstalkd 1.9 claims to be built with debug symbols, however when I try to open the core dump with gdb, it says that no debugging symbols were found. As such, I've not included a core. If it would be helpful for me to provide a core dump and a beanstalkd bin with debug symbols, let me know.

Related branches

The attachment "Not sure what correct patch format is. This is a diff that fixes the issue." seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Danny Guinther (dannyguinther) wrote :

Just found a Raring VM I had lying around. Raring does not seem to be affected.

Saucy however, does seem to be affected by this bug. beanstalkd segfaults when backgrounded then moved to the foreground anyway.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package beanstalkd - 1.9-2ubuntu1

---------------
beanstalkd (1.9-2ubuntu1) trusty; urgency=medium

  * debian/patches/0003-Use-external-sd-daemon-on-linux.patch: Dropped
    causes FTBFS on Ubuntu.
 -- Chuck Short <email address hidden> Mon, 13 Jan 2014 09:37:04 -0500

Changed in beanstalkd (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers