[Bug 615953] Re: busybox sed core dump

Bug Watch Updater 615953 at bugs.launchpad.net
Fri Oct 27 13:06:05 UTC 2017


Launchpad has imported 9 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=624852.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2010-08-17T22:39:20+00:00 Matthew wrote:

Description of problem:
compiling a minimal test application statically using gcc, the call strspn() causes a SIGILL.  Prints "Illegal instruction" on the command line.

Changing "char var[]" to "char *var" for strtext and cset causes the
problem to decrease from always occuring despite optimization level to
occuring only during -O0.

Does not occur for dynamically linked application.

Version-Release number of selected component (if applicable):
glibc-static-2.12-3

How reproducible:
Every time.

Steps to Reproduce:
1. Compile main.c below (strspn test) with "gcc main.c -g -static -O0 -o testapp.bin"
2. Run ./testapp.bin
3. Run gdb ./testapp.bin
  
Actual results:
When ran from the command line, output is "Illegal instruction"
When ran from the debugger, output is 
Program received signal SIGILL, Illegal instruction.
0x08052f5d in __strspn_sse42 ()

Expected results:
Prints-"The length of initial number is 3."

Additional info:
#######main.c############
#include <stdio.h>
#include <string.h>

int main (int argc, char *argv[]){
   char strtext[] = "129th";
   char cset[]    = "1234567890";
   int i;

   i = strspn( strtext, cset );
   printf ( "The length of initial number is %d.\n", i );

   return 0;
}
#########################

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/comments/1

------------------------------------------------------------------------
On 2010-08-17T23:25:01+00:00 Eugene wrote:

Eugene Zobachev 2010-08-17  17:58:14 CDT

I have experienced exactly same problem with the similar code.
The code was compiled and executed on the same computer (Linux server
with Fedora 13).
Surprisingly, this code executes correctly in Ubuntu QEMU and KVN
from the flash drive with Fedora 13, whereas Windows QEMU indicates 
same error ("Illegal instruction" in __strspn_sse42).

Additional information:
If you change "strspn" to "strcspn" in the code fragment above,
the static build works fine.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/comments/2

------------------------------------------------------------------------
On 2010-08-18T08:55:53+00:00 Andreas wrote:

Looks like the VM is lying about the cpu capabilities.  Please provide
the contents of /proc/cpuinfo.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/comments/3

------------------------------------------------------------------------
On 2010-08-18T14:01:42+00:00 Matthew wrote:

For the original post, it was on actual hardware.  
My /proc/cpuinfo is 
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz
stepping        : 10
cpu MHz         : 2992.402
...
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/comments/4

------------------------------------------------------------------------
On 2010-08-20T08:48:39+00:00 Fedora wrote:

glibc-2.12.1-2 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/glibc-2.12.1-2

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/comments/5

------------------------------------------------------------------------
On 2010-08-20T18:04:28+00:00 Matthew wrote:

Confirmed - glibc-2.12.1-2 fixes the issue.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/comments/6

------------------------------------------------------------------------
On 2010-08-23T12:57:58+00:00 Fedora wrote:

glibc-2.12.90-8 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/glibc-2.12.90-8

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/comments/7

------------------------------------------------------------------------
On 2010-09-01T05:43:43+00:00 Fedora wrote:

glibc-2.12.90-8 has been pushed to the Fedora 14 stable repository.  If
problems still persist, please make note of it in this bug report.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/comments/8

------------------------------------------------------------------------
On 2010-09-24T20:37:32+00:00 Fedora wrote:

glibc-2.12.1-2 has been pushed to the Fedora 13 stable repository.  If
problems still persist, please make note of it in this bug report.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/comments/9


** Changed in: eglibc (Fedora)
       Status: Unknown => Fix Released

** Changed in: eglibc (Fedora)
   Importance: Unknown => High

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to eglibc in Ubuntu.
https://bugs.launchpad.net/bugs/615953

Title:
  busybox sed core dump

Status in eglibc package in Ubuntu:
  Fix Released
Status in eglibc source package in Lucid:
  Fix Released
Status in eglibc source package in Maverick:
  Fix Released
Status in eglibc package in Fedora:
  Fix Released

Bug description:
  Binary package hint: busybox-static

  $ echo "a" | busybox sed -e 's,a,b,'
  Illegal instruction (core dumped)

  $ busybox --help | grep ^Busy
  BusyBox v1.15.3 (Ubuntu 1:1.15.3-1ubuntu1) multi-call binary
  $ dpkg -S `which busybox`
  busybox-static: /bin/busybox
  $ dpkg-query --show busybox-static
  busybox-static  1:1.15.3-1ubuntu1

  I believe this is a problem due to running in xen on ec2.  Below is
  the backtrace from gdb.

  #0  0x0806db7d in __strspn_sse42 ()
  #1  0x0813a2bb in add_cmd (cmdstr=0x81926c8 "s/a/B/") at editors/sed.c:511
  #2  0x0813a71a in add_cmd_block (cmdstr=0x81926c8 "s/a/B/")
      at editors/sed.c:1241
  #3  0x0813b249 in sed_main (argc=4, argv=0xbffff214) at editors/sed.c:1298
  #4  0x080e7297 in run_applet_no_and_exit (applet_no=144, argv=0x81926c8)
      at libbb/appletlib.c:741
  #5  0x080e72b8 in run_applet_and_exit (name=0xbffff36a "sed", argv=0xbffff208)
      at libbb/appletlib.c:748
  #6  0x080e749b in busybox_main (name=<value optimized out>, argv=0xbffff208)
      at libbb/appletlib.c:713
  #7  run_applet_and_exit (name=<value optimized out>, argv=0xbffff208)
      at libbb/appletlib.c:750
  #8  0x080e7504 in main (argc=5, argv=0xbffff204) at libbb/appletlib.c:785

  It is moderately annoying, because there is noclean way to really
  replace busybox-static with busybox , because ubuntu-standard depends
  on busybox.  'busybox' does not have this problem.

  ProblemType: Bug
  DistroRelease: Ubuntu 10.10
  Package: busybox-static 1:1.15.3-1ubuntu1
  ProcVersionSignature: User Name 2.6.35-14.20-virtual 2.6.35
  Uname: Linux 2.6.35-14-virtual i686
  Architecture: i386
  Date: Tue Aug 10 16:59:00 2010
  Ec2AMI: ami-eaa64c83
  Ec2AMIManifest: ubuntu-images-testing-us/ubuntu-maverick-daily-i386-server-20100810.manifest.xml
  Ec2AvailabilityZone: us-east-1b
  Ec2InstanceType: m1.small
  Ec2Kernel: aki-407d9529
  Ec2Ramdisk: unavailable
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: busybox

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/615953/+subscriptions



More information about the foundations-bugs mailing list