maemo.org Bugzilla – Full Text Bug Listing
|Summary:||apt-get segfaults when system has ran out of ptys|
|Product:||[Maemo Official Applications] Settings and Maintenance||Reporter:||Lucas Maneos <maemo>|
|Component:||Application manager||Assignee:||unassigned <nobody>|
|Status:||VERIFIED FIXED||QA Contact:||application-manager-bugs|
SOFTWARE VERSION: 1.2009.42-11 STEPS TO REPRODUCE THE PROBLEM: 1. Exhaust system ptys (currently 4, so not hard) by opening enough osso-xterms (or ssh, screen etc sessions). 2. Try to install some package with apt-get. EXPECTED OUTCOME: Successful installation, or failing that an error message and graceful exit. ACTUAL OUTCOME: Nokia-N900-42-11:~# apt-get install ltrace Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: ltrace 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 80.2kB of archives. After this operation, 221kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! ltrace Install these packages without verification [y/N]? y Get:1 http://repository.maemo.org fremantle/tools/free ltrace 0.5+svn20070904-0.1maemo1 [80.2kB] Fetched 80.2kB in 2s (36.0kB/s) Can not write log, openpty() failed (/dev/pts not mounted?) Segmentation fault REPRODUCIBILITY: Always. EXTRA SOFTWARE INSTALLED: OTHER COMMENTS: Hope this is the right component for apt :-) Fixing bug 5824 will make this less likely to occur, but regardless of that apt-get shouldn't crash. Leaving severity at normal as it doesn't seem to cause any bad side effects.
Fixed in master branch, it was just a matter of a missing NULL check: commit 305f55f38cbfc3fb897b381f5cfbebbcf5e79ac3 Don't segfault when installing if running out of pty's * apt-pkg/deb/dpkgpm.cc (pkgDPkgPM::Go): NULL check term_out Also, reported as a bug to upstream APT in debian, attaching the same patch
(In reply to comment #1) > [...] > Also, reported as a bug to upstream APT in debian, attaching the same patch Here's the one: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561109
This has been fixed in package apt 0.7.20.2maemo13.1+0m5 which is part of the internal build version 2010.02-7 (Note: 2010 is the year, and the number after is the week.) A future public update released with the year/week later than this internal build version will include the fix. (This is not always already the next public update.) Please verify that this new version fixes the bug by marking this bug report as VERIFIED after the public update has been released and if you have some time. To answer popular followup questions: * Nokia does not announce release dates of public updates in advance. * There is currently no access to these internal, non-public build versions. A Brainstorm proposal to change this exists at http://maemo.org/community/brainstorm/view/undelayed_bugfix_releases_for_nokia_open_source_packages-002/
(Corection: Fix already included in 3.2010.02-1)
The problem reported here should be fixed in the update released today for public: The Maemo5 update version 3.2010.02-8 (also called "PR1.1.1" sometimes). Please leave a comment if the problem is not fixed for you in this update version.
Verifying, it proceeds to install without crashing now. Example: # apt-get install xrestop Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: xrestop 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. Need to get 11.3kB of archives. After this operation, 94.2kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! xrestop Install these packages without verification [y/N]? y Get:1 http://repository.maemo.org fremantle/tools/free xrestop 0.4-3maemo1 [11.3kB] Fetched 11.3kB in 0s (51.1kB/s) Can not write log, openpty() failed (/dev/pts not mounted?) Selecting previously deselected package xrestop. (Reading database ... 32553 files and directories currently installed.) Unpacking xrestop (from .../xrestop_0.4-3maemo1_armel.deb) ... Can not write log, openpty() failed (/dev/pts not mounted?) Setting up xrestop (0.4-3maemo1) ...