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]

RE: Old Thread: Cygwin Performance


Hi all,

while makeing some tests I recognized, that sometime select() and close() crashes, if the number of used file
descriptors is > 60.

With a value >93 select() crashes.
With a value between 61 and 81 a close() call crashes instead of select(), but it seems that this is caused by the
previous select() call.

Appended is a little test app for error reproducing.

$ ./test 60
dup
select
close
close2

$ ./test 61
dup
select
close
Segmentation fault (core dumped)

$ ./test 62
dup
select
close
Segmentation fault (core dumped)

...
$ ./test 81
dup
select
close
Segmentation fault (core dumped)

$ ./test 82
dup
select
close
close2

.....

$ ./test 92
dup
select
close
close2

$ ./test 93
dup
select
Segmentation fault (core dumped)

The select() crashes in the cygwin1.dll in the method "select_stuff::~select_stuff" like shown in the strace
snippet below
 4604 7210385 [main] lat_select 2308 set_bits: ready 1
 4401 7214786 [main] lat_select 2308 set_bits: me 0xA011808, testing fd 7 (/tmp/t904.0)
 4738 7219524 [main] lat_select 2308 set_bits: ready 1
 4472 7223996 [main] lat_select 2308 set_bits: me 0xA0117D8, testing fd 6 (/tmp/t904.0)
 4487 7228483 [main] lat_select 2308 set_bits: ready 1
 4573 7233056 [main] lat_select 2308 set_bits: me 0xA0117A8, testing fd 5 (/tmp/t904.0)
 4601 7237657 [main] lat_select 2308 set_bits: ready 1
 4601 7242258 [main] lat_select 2308 set_bits: me 0xA011778, testing fd 4 (/tmp/t904.0)
 4422 7246680 [main] lat_select 2308 set_bits: ready 1
 4597 7251277 [main] lat_select 2308 select_stuff::poll: returning 75
 4576 7255853 [main] lat_select 2308 select_stuff::cleanup: calling cleanup routines
 4623 7260476 [main] lat_select 2308 select_stuff::~select_stuff: deleting select records
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14184 7274660 [main] lat_select 2308 handle_exceptions: In cygwin_except_handler exc 0xC0000005 at 0xB0 sp 0x22F91C

I hope this help to fix this bug

Ralf

Attachment: test.c
Description: Binary data

--
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]