This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

segfault with bash / latest CVS cygwin1.dll


I am seeing a segfault with bash which appears to be due to a
fhandler_socket method being called on a NULL pointer.

To reproduce type:
strace bash -c <anything>

Here's the stackdump:
Exception: STATUS_ACCESS_VIOLATION at eip=6103CB6E
eax=00000000 ebx=00000000 ecx=610AC890 edx=00000000 esi=0022FE20
edi=0022FE24
ebp=0022FDE4 esp=0022FDBC program=C:\cygwin\bin\bash.exe
cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
Stack trace:
Frame     Function  Args
0022FDE4  6103CB6E  (00000000, 0022FE24, 0022FE20, 61037047)
0022FE34  00403774  (00000000, 610AB290, 00000000, 004329E7)
0022FE74  00401F1E  (00000004, 610AB3F0, 00000000, 00000004)
0022FEB4  004017C6  (00000003, 0A012668, 0A010278, 00400000)
0022FF10  61005466  (00000000, 00000000, 03010301, 000101E5)
0022FF40  6100575A  (00401208, 03010301, 00000004, 827F4000)
0022FF60  61005799  (00000000, 00000000, 00000008, BA74FC94)
0022FF90  0046ECAF  (00401208, 00000001, 00000000, 805B406F)
0022FFC0  0040103D  (03010301, 03010301, 7FFDF000, BA74FCF4)
0022FFF0  77E7EB69  (00401000, 00000000, 78746341, 00000020)
End of stack trace

$ addr2line -e /bin/cygwin1.dll 6103CB6E
/usr/src/cygwin-cvs/src/winsup/cygwin/fhandler.h:374

And here's an strace snippet:

  141 1223952 [main] bash 1712 dtable::build_fhandler: fd -1, fh 0x616105FC
   53 1224005 [main] bash 1712 stat_worker: (/usr/bin/bash, 0x22FB04, 0,
0x22F75
4), file_attributes 32
   53 1224058 [main] bash 1712 fhandler_base::open: (C:\cygwin\bin\bash.exe,
0x1
10000) query_open 1
  224 1224282 [main] bash 1712 fhandler_base::open: 0x67C = CreateFileA
(C:\cygw
in\bin\bash.exe, 0x0, 0x7, 0x22F684, 0x3, 0x2000081, 0)
   67 1224349 [main] bash 1712 fhandler_base::set_flags: flags 0x110000,
supplie
d_bin 0x10000
   48 1224397 [main] bash 1712 fhandler_base::set_flags: O_TEXT/O_BINARY set
in
flags 0x10000
   48 1224445 [main] bash 1712 fhandler_base::set_flags: filemode set to
binary
   46 1224491 [main] bash 1712 fhandler_base::open: 1 = fhandler_base::open
(C:\
cygwin\bin\bash.exe, 0x110000)
  105 1224596 [main] bash 1712 fhandler_disk_file::open: 1 =
fhandler_disk_file:
:open (C:\cygwin\bin\bash.exe, 0x110000)
   93 1224689 [main] bash 1712 fhandler_disk_file::fstat_by_handle: 1 =
GetFileI
nformationByHandle (C:\cygwin\bin\bash.exe, 1660)
   59 1224748 [main] bash 1712 get_nt_attribute: file:
C:\cygwin\bin\bash.exe
   52 1224800 [main] bash 1712 read_sd: file = C:\cygwin\bin\bash.exe
  242 1225042 [main] bash 1712 read_sd: file = C:\cygwin\bin\bash.exe:
len=128
34417 1259459 [main] bash 1712 get_nt_attribute: file:
C:\cygwin\bin\bash.exe 1E
D, uid 544, gid 544
  170 1259629 [main] bash 1712 fhandler_disk_file::fstat_helper: 0 = fstat
(, 0x
22FB04) st_atime=3D220080 st_size=478720, st_mode=0x81ED, st_ino=120201560,
size
of=88
   62 1259691 [main] bash 1712 fhandler_base::close: closing '/usr/bin/bash'
han
dle 0x67C
  135 1259826 [main] bash 1712 stat_worker: 0 = (/usr/bin/bash, 0x22FB04)
 3635 1263461 [main] bash 1712 sigaction: signal 20, newact 0x22FCF4, oldact
0x2
2FCE4
  703 1264164 [main] bash 1712 handle_exceptions: In cygwin_except_handler
exc 0
xC0000005 at 0x6103CB6E sp 0x22FDBC
   53 1264217 [main] bash 1712 handle_exceptions: In cygwin_except_handler
sig =
 11 at 0x6103CB6E
  114 1264331 [main] bash 1712 handle_exceptions: In cygwin_except_handler
calli
ng 0x0
1264383 [main] bash 1712 handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
   52 1264383 [main] bash 1712 handle_exceptions: Exception:
STATUS_ACCESS_VIOLA
TION
19114 1283497 [main] bash 1712 try_to_debug: debugger_command ''
1289437 [main] bash 1712 open_stackdumpfile: Dumping stack trace to
bash.exe.sta
ckdump
 5940 1289437 [main] bash 1712 open_stackdumpfile: Dumping stack trace to
bash.e
xe.stackdump
3089025 4378462 [main] bash 1712 signal_exit: about to call do_exit (18B00)
   85 4378547 [main] bash 1712 do_exit: do_exit (101120)

Regards
Chris



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]