dnschneid / crouton

Chromium OS Universal Chroot Environment
https://goo.gl/fd3zc?si=1
BSD 3-Clause "New" or "Revised" License
8.56k stars 1.24k forks source link

xiwi window crashes with popen2: Failed to create pipe. #1286

Closed divx118 closed 9 years ago

divx118 commented 9 years ago

When leaving a chroot running for an extended period of time it crashes. This seems to happen coming out of standby at least it did for me 2 times. Errors in the crosh window: http://pastebin.com/dfQ6VuvB The find_shm: Invalid signature, fetching new shm! happens after I start the chroot and keeps popping up regularly. I have to ctr-C in the crosh window to exit and restart the chroot. Clicking in the crouton chromeos app on the chroot running fails with can't connect.

dnschneid commented 9 years ago

Oh yeah, major fd leak in fbserver. Looks like an issue with popen2, since all the extra fds are pipes.

drinkcat commented 9 years ago

Yeah, popen2 does not close one end of the pipes (the child does, but the parent also needs to do it since the fds are cloned). Closing the fds on success+error fixes the issue, but I think they should be closed before the main loop. I'll work on a proper fix.

monaka commented 9 years ago

I got a similar issue. The difference is to stop with assertion failed. Hope this bring some additional hints to fix it.

find_shm: Error running helper.
write_image: Cannot find shm, moving on...
popen2: Failed to create pipe. (Too many open files)
find_shm: Error running helper.
write_image: Cannot find shm, moving on...
popen2: Failed to create pipe. (Too many open files)
find_shm: Error running helper.
write_image: Cannot find shm, moving on...
popen2: Failed to create pipe. (Too many open files)
find_shm: Error running helper.
write_image: Cannot find shm, moving on...
popen2: Failed to create pipe. (Too many open files)
change_resolution: ASSERTION c > 0 FAILED (popen2)
dnschneid commented 9 years ago

Please update with the latest chroot.