cpulimit segmentation fault

Bug #241538 reported by Daniël van Eeden
4
Affects Status Importance Assigned to Milestone
cpulimit (Debian)
Fix Released
Unknown
cpulimit (Ubuntu)
Fix Released
Undecided
gregor herrmann

Bug Description

Binary package hint: cpulimit

$ dpkg -l cpulimit
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=================================-=================================-==================================================================================
ii cpulimit 1.1-10 limits the cpu usage of a process
$ cpulimit --exe /bin/ls --limit 10
Segmentation fault
$ apt-get source cpulimit
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'cpulimit' packaging is maintained in the 'Svn' version control system at:
http://svn.toastfreeware.priv.at/debian/cpulimit/trunk/
Need to get 10.5kB of source archives.
Get:1 http://nl.archive.ubuntu.com hardy/universe cpulimit 1.1-10 (dsc) [778B]
Get:2 http://nl.archive.ubuntu.com hardy/universe cpulimit 1.1-10 (tar) [5106B]
Get:3 http://nl.archive.ubuntu.com hardy/universe cpulimit 1.1-10 (diff) [4657B]
Fetched 10.5kB in 0s (158kB/s)
gpg: Signature made Sun 04 Mar 2007 06:57:05 PM CET using DSA key ID F972BE03
gpg: Can't check signature: public key not found
dpkg-source: extracting cpulimit in cpulimit-1.1
dpkg-source: unpacking cpulimit_1.1.orig.tar.gz
dpkg-source: applying ./cpulimit_1.1-10.diff.gz
$ cd cpulimit-1.1/
$ make cpulimit
gcc -o cpulimit cpulimit.c -lrt -Wall -O2
$ gdb --args ./cpulimit --exe /bin/ls --limit 10
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) r
Starting program: /tmp/cpulimit-1.1/cpulimit --exe /bin/ls --limit 10
[Thread debugging using libthread_db enabled]
[New Thread 0xb7e316b0 (LWP 3220)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7e316b0 (LWP 3220)]
0xb7e7a87b in ?? () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt full
#0 0xb7e7a87b in ?? () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#1 0xb7e7a5e0 in strtol () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0x08049680 in main ()
No locals.
(gdb) q
The program is running. Exit anyway? (y or n) y
$ sudo apt-get install libc6-d
libc6-dbg libc6-dev libc6-dev-amd64
$ sudo apt-get install libc6-dbg
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libc6-dbg
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 5095kB of archives.
After this operation, 18.1MB of additional disk space will be used.
Get:1 http://nl.archive.ubuntu.com hardy/main libc6-dbg 2.7-10ubuntu3 [5095kB]
Fetched 5095kB in 0s (9719kB/s)
Selecting previously deselected package libc6-dbg.
(Reading database ... 214541 files and directories currently installed.)
Unpacking libc6-dbg (from .../libc6-dbg_2.7-10ubuntu3_i386.deb) ...
Setting up libc6-dbg (2.7-10ubuntu3) ...
$ gdb --args ./cpulimit --exe /bin/ls --limit 10
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) r
Starting program: /tmp/cpulimit-1.1/cpulimit --exe /bin/ls --limit 10
[Thread debugging using libthread_db enabled]
[New Thread 0xb7e476b0 (LWP 3266)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7e476b0 (LWP 3266)]
0xb7e9087b in ____strtol_l_internal () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt full
#0 0xb7e9087b in ____strtol_l_internal () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#1 0xb7e905e0 in strtol () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0x08049680 in main ()
No locals.
(gdb)

Revision history for this message
gregor herrmann (gregoa) wrote :

link to Debian bug; assign to /me; status: confirmed

Changed in cpulimit:
status: New → Unknown
assignee: nobody → gregoa
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cpulimit - 1.1-10ubuntu1

---------------
cpulimit (1.1-10ubuntu1) intrepid; urgency=low

  * Add patch to fix broken list of arguments for long options (LP: #241538).
  * Modify Maintainer value to match the DebianMaintainerField
    specification.

 -- Cesare Tirabassi <email address hidden> Fri, 20 Jun 2008 15:17:28 +0200

Changed in cpulimit:
status: Confirmed → Fix Released
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Sorry about that Gregor, apparently we were working on this at the same time.
I also sent you an email with my patch, you may close it since it is a duplicate of the bug you just opened yourself.

Revision history for this message
gregor herrmann (gregoa) wrote : Re: [Bug 241538] Re: cpulimit segmentation fault

On Fri, 20 Jun 2008 13:33:53 -0000, Cesare Tirabassi wrote:

> Sorry about that Gregor, apparently we were working on this at the same time.
> I also sent you an email with my patch, you may close it since it
> is a duplicate of the bug you just opened yourself.

No problem, I've merged the two Debian bugs and will use your patch,
it's nicer than my quick attempt.

Thanks again,
gregor

--
 .''`. http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
 : :' : debian gnu/linux user, admin & developer - http://www.debian.org/
 `. `' member of https://www.vibe.at/ | how to reply: http://got.to/quote/
   `- NP: Rolling Stones: Street Fighting Man

Changed in cpulimit:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.