Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#891 closed defect (fixed)

pjlib-test failed with "Bus Error" on MacOS X

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.3
Component: unit-tests Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

QA report:

only run pjlib-test, found problem:

first run:
---
 23:32:28.571 Running udp_ioqueue_unreg_test()...
 23:32:28.571 ..testing with concurency=1
 23:32:28.571 ...ioqueue unregister stress test 0/3 (select)
 23:32:29.587 ....repeat 0/10: done (210 KB/s)
 23:32:30.613 ....repeat 1/10: done (207 KB/s)
 23:32:31.640 ....repeat 2/10: done (207 KB/s)
 23:32:32.657 ....repeat 3/10: done (209 KB/s)
 23:32:33.682 ....repeat 4/10: done (206 KB/s)
 23:32:34.709 ....repeat 5/10: done (206 KB/s)
 23:32:35.720 ....repeat 6/10: done (213 KB/s)
 23:32:36.731 ....repeat 7/10: done (209 KB/s)
Bus error
---

second try, it seemed to stuck (more than 12 minutes) at:
---
 23:36:14.558 Running udp_ioqueue_unreg_test()...
....
 23:36:55.235 ..testing with concurency=0
 23:36:55.235 ...ioqueue unregister stress test 0/3 (select)
 23:36:56.262 ....repeat 0/10: done (207 KB/s)
 23:36:57.272 ....repeat 1/10: done (207 KB/s)
----

third try, error (same as first try)
 23:52:39.335 Running udp_ioqueue_unreg_test()...
 23:52:39.335 ..testing with concurency=1
 23:52:39.335 ...ioqueue unregister stress test 0/3 (select)
 23:52:40.363 ....repeat 0/10: done (207 KB/s)
 23:52:41.373 ....repeat 1/10: done (209 KB/s)
 23:52:42.390 ....repeat 2/10: done (208 KB/s)
 23:52:43.406 ....repeat 3/10: done (207 KB/s)
 23:52:44.423 ....repeat 4/10: done (206 KB/s)
 23:52:45.432 ....repeat 5/10: done (209 KB/s)
 23:52:46.440 ....repeat 6/10: done (209 KB/s)
 23:52:47.450 ....repeat 7/10: done (208 KB/s)
Bus error

The corresponding ticket for 1.0.x is #899

Change History (7)

comment:1 Changed 16 years ago by nanang

Another try, assertion occured:

08:06:29.447 Running udp_ioqueue_unreg_test()...
08:06:29.447 ..testing with concurency=1
...
08:06:39.596 ...ioqueue unregister stress test 1/3 (select)
08:06:40.612 ....repeat 0/10: done (206 KB/s)
08:06:41.639 ....repeat 1/10: done (207 KB/s)
08:06:42.659 ....repeat 2/10: done (207 KB/s)
08:06:43.668 ....repeat 3/10: done (206 KB/s)
08:06:44.678 ....repeat 4/10: done (208 KB/s)
08:06:45.704 ....repeat 5/10: done (206 KB/s)
08:06:46.731 ....repeat 6/10: done (207 KB/s)

Assertion failed: (!"Error destroying pthread_mutex"), function pj_mutex_destroy, file ../src/pj/os_core_unix.c, line 1331.

comment:2 Changed 16 years ago by bennylp

The bus error happened deep in libc. Running under gdb:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0xb0081048
0x90c0dd26 in __error ()

(gdb) bt
#0  0x90c0dd26 in __error ()
#1  0x90c0dccf in cthread_set_errno_self ()
#2  0x90c0da03 in cerror ()
#3  0x90c14176 in usleep$UNIX2003 ()
#4  0x00007455 in pj_thread_sleep (msec=20) at ../src/pj/os_core_unix.c:707
#5  0x000064c9 in pj_ioqueue_poll (ioqueue=0x809464, timeout=0xb0080f34) at ../src
/pj/ioqueue_select.c:673
#6  0x00001dc6 in worker_thread (arg=0x809464) at ../src/pjlib-test/ioq_unreg.c:131
#7  0x00006f91 in thread_main (param=0x80b224) at ../src/pj/os_core_unix.c:470
#8  0x90c3e095 in _pthread_start ()
#9  0x90c3df52 in thread_start ()

comment:3 Changed 16 years ago by bennylp

Note: the assertion occurs when pjlib fails to destroy a mutex.

comment:4 Changed 16 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r2782:

  • fixed the deadlock in the test
  • with the deadlock gone, the Bus error and assertion seem to be fixed too

comment:5 Changed 16 years ago by bennylp

  • Milestone changed from release-1.3-QA to release-1.3

comment:6 Changed 16 years ago by bennylp

  • Component changed from pjlib to unit-tests

comment:7 Changed 16 years ago by bennylp

  • Description modified (diff)
Note: See TracTickets for help on using tickets.