Mantis - coreutils
Viewing Issue Advanced Details
4671 upgrade crash always 2011-01-17 14:25 2011-03-14 14:25
ochsnerm  
bwalton  
normal  
closed  
fixed  
none    
none  
0004671: gtouch dumps core on coreutils 8.8
Last week I updated coreutils from Version 8.4 to Version 8.8

Now a simple touch command creates a coredump:

[a80774103@sansho ~]$ touch testfile
Segmentation Fault (core dumped)
[a80774103@sansho ~]$ ls
core testfile
[a80774103@sansho ~]$ adb core
core file = core -- program ``/opt/csw/bin/gtouch'' on platform i86pc
SIGSEGV: Segmentation Fault
where
adb: failed to dereference symbol: unknown symbol name

truss shows that gtouch does a endless dup of the fd=0 after creating the file.
See the attached (shortened) output of truss.

I applied the recomended patches of 10/01/2011 and upgraded all CSW packages. These are the only changes to this system in the last month. Our other unchanged production system shows no such problem.

Please mail me if any additional info is required.

Thanks, Markus Ochsner
...
/2: lwp_exit()
/1: lwp_wait(2, 0x08047B9C) = 0
/1: brk(0x080779D0) = 0
/1: brk(0x080799D0) = 0
sysconfig(_CONFIG_PAGESIZE) = 4096
open64("testfile", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY, 0666) = 3
fcntl(3, F_DUP2FD, 0x00000000) = 0
close(3) = 0
fcntl(0, F_DUP2FD, 0x00000000) = 0
fcntl(0, F_DUP2FD, 0x00000000) = 0
...
... many times repeated
...
fcntl(0, F_DUP2FD, 0x00000000) = 0
fcntl(0, F_DUP2FD, 0x00000000) = 0
    Incurred fault 0000006, FLTBOUNDS %pc = 0x0805A30C
      siginfo: SIGSEGV SEGV_MAPERR addr=0x07647FD8
    Received signal 0000011, SIGSEGV [default]
      siginfo: SIGSEGV SEGV_MAPERR addr=0x07647FD8
[a80774103@sansho ~]$
Issue History
2011-01-17 14:25 ochsnerm New Issue
2011-01-18 02:26 bwalton Note Added: 0008706
2011-01-18 10:15 dam Note Added: 0008707
2011-01-18 10:16 dam Note Edited: 0008707
2011-01-20 02:32 bwalton Status new => assigned
2011-01-20 02:32 bwalton Assigned To => bwalton
2011-01-20 02:34 bwalton Note Added: 0008713
2011-01-20 03:43 bwalton Note Added: 0008715
2011-03-11 03:28 bwalton Note Added: 0008886
2011-03-13 03:22 bwalton Note Added: 0008888
2011-03-13 03:22 bwalton Status assigned => resolved
2011-03-13 03:22 bwalton Resolution open => fixed
2011-03-14 03:06 bwalton Status resolved => closed
2011-03-14 08:49 ochsnerm Note Added: 0008899
2011-03-14 08:49 ochsnerm Status closed => feedback
2011-03-14 08:49 ochsnerm Resolution fixed => reopened
2011-03-14 09:06 ochsnerm Note Added: 0008900
2011-03-14 12:12 bwalton Note Added: 0008901
2011-03-14 13:57 bwalton Note Added: 0008906
2011-03-14 14:20 ochsnerm Note Added: 0008907
2011-03-14 14:25 bwalton Note Added: 0008908
2011-03-14 14:25 bwalton Status feedback => closed
2011-03-14 14:25 bwalton Resolution reopened => fixed

Notes
(0008706)
bwalton   
2011-01-18 02:26   
Hi Markus,

I'll dig into this a bit. I think it's likely related to a few changes with the recent patch set that broke other gnulib-based utilities. I'll also get 8.9 packaged up for you to test.

Thanks
-Ben
(0008707)
dam   
2011-01-18 10:15   
(edited on: 2011-01-18 10:16)
This happens only on Solaris 10, both Sparc v9 and amd64. The Solaris 9 gtouch works on both Sparc and i386.

As it also cores on the buildfarm this currently prohibits building 64 bit stuff on amd64 with autoconf.

(0008713)
bwalton   
2011-01-20 02:34   
The breakage still exists with 8.9. Digging further.

-Ben
(0008715)
bwalton   
2011-01-20 03:43   
Building on solaris 10 directly sees gtouch work properly...
(0008886)
bwalton   
2011-03-11 03:28   
Upstream bug identifier is: 8230
(0008888)
bwalton   
2011-03-13 03:22   
Updated packages pushed for release. They contain a patch from upstream to address the issue.
(0008899)
ochsnerm   
2011-03-14 08:49   
Today I upgraded all my csw-packages.

gtouch does a coredump nevertheless:

[root@sansho]# truss gtouch test
...
fcntl(0, F_DUP2FD, 0x00000000) = 0
fcntl(0, F_DUP2FD, 0x00000000) = 0
fcntl(0, F_DUP2FD, 0x00000000) = 0
    Incurred fault 0000006, FLTBOUNDS %pc = 0xFEED43BE
      siginfo: SIGSEGV SEGV_MAPERR addr=0x07647FFC
    Received signal 0000011, SIGSEGV [default]
      siginfo: SIGSEGV SEGV_MAPERR addr=0x07647FFC
(0008900)
ochsnerm   
2011-03-14 09:06   
I'am testing CSWcoreutils 8.10,REV=2011.03.08.

Does this packgage include the bugfix?
(0008901)
bwalton   
2011-03-14 12:12   
No, I released two updates over the weekend, thinking the first solved the problem. You need 8.10,p which includes a patch that will be in 8.11. This was batched but may not be on the mirrors yet.

Sorry for the confusion, my note wasn't clear about which version to look for.

Thanks
-Ben
(0008906)
bwalton   
2011-03-14 13:57   
I was on my phone earlier, so this was too cumbersome to enter: If you want the fixed coreutils packages before they hit the mirrors, you can get them from the buildfarm.

http://buildfarm.opencsw.org/experimental.html#bwalton-submit [^]

Thanks
-Ben
(0008907)
ochsnerm   
2011-03-14 14:20   
I can confirm that this version fixes the coredump problem.

Thank you very much.

-Markus
(0008908)
bwalton   
2011-03-14 14:25   
Fix confirmed.