OCaml Forge
SCM

Detail: [#893] Non-blocking calls are not thread-safe

Bugs: Browse | Download .csv | Monitor

[#893] Non-blocking calls are not thread-safe

Date:
2011-01-25 17:19
Priority:
3
State:
Open
Submitted by:
Eray Ozkural (examachine)
Assigned to:
Nobody (None)
Hardware:
None
Resolution:
Fixed
Severity:
major
Version:
None
Component:
None
Operating System:
All
Product:
None
 
URL:
Summary:
Non-blocking calls are not thread-safe

Detailed description
I've been testing the async calls that I've written. They work pretty well on single-threaded scenarios, but combining them with the threads package gave rise to the following crash. I believe my impl. is not thread-safe, that is why this happens.

Until we fix it, the user must be cautioned not to call these functions in multi-threaded applications.


sirius:textcat malfunct$ mpirun -np 2 src/par-all-pairs-vert -dv data/radikal.dv -threshold 0.6 -algo 3
Reading DV file data/radikal.dv
Normalizing
Converting to Fixed Point
Partitioning dims with: weight: allpairs0 sum_i C(freq_i,2)
Partition dimensions according to all-pairs-0 load

* Running par-all-pairs-0-array-vert-opt
..[sirius:01949] *** Process received signal ***
[sirius:01949] Signal: Segmentation fault (11)
[sirius:01949] Signal code: Address not mapped (1)
[sirius:01949] Failing at address: 0xfffffffffffffff9
[sirius:01949] [ 0] 2 libSystem.B.dylib 0x00007fff835b467a _sigtramp + 26
[sirius:01949] [ 1] 3 ??? 0xd8cb5e18f465b26c 0x0 + 15621683193737228908
[sirius:01949] *** End of error message ***
[sirius:01951] *** Process received signal ***
[sirius:01951] Signal: Segmentation fault (11)
[sirius:01951] Signal code: Address not mapped (1)
[sirius:01951] Failing at address: 0x0
[sirius:01951] *** Process received signal ***
[sirius:01951] Signal: Bus error (10)
[sirius:01951] Signal code: (2)
[sirius:01951] Failing at address: 0x10b073e18
[sirius:01951] [ 0] 2 libSystem.B.dylib 0x00007fff835b467a _sigtramp + 26
[sirius:01951] [ 1] 3 ??? 0x000000010088e288 0x0 + 4303938184
[sirius:01951] [ 2] 4 par-all-pairs-vert 0x00000001000567cf caml_thread_scan_roots + 77
[sirius:01951] [ 3] 5 par-all-pairs-vert 0x000000010005bf93 caml_oldify_local_roots + 724
[sirius:01951] [ 4] 6 par-all-pairs-vert 0x000000010005e6d7 caml_empty_minor_heap + 66
[sirius:01951] [ 5] 7 par-all-pairs-vert 0x000000010005e80d caml_minor_collection + 22
[sirius:01951] [ 6] 8 par-all-pairs-vert 0x000000010005e8bf caml_check_urgent_gc + 76
[sirius:01951] [ 7] 9 par-all-pairs-vert 0x000000010006b046 caml_alloc_custom + 112
[sirius:01951] [ 8] 10 par-all-pairs-vert 0x000000010005f6b8 caml_alloc_final + 59
[sirius:01951] [ 9] 11 par-all-pairs-vert 0x0000000100051db4 caml_mpi_alloc_request + 36
[sirius:01951] [10] 12 par-all-pairs-vert 0x0000000100052381 caml_mpi_isend + 209
[sirius:01951] [11] 13 par-all-pairs-vert 0x000000010006bb1c caml_c_call + 32
[sirius:01951] *** End of error message ***

Followup

Message
Date: 2011-06-19 10:14
Sender: Eray Ozkural

There was a bug with allocation of requests that I just fixed. This bug should disappear now.

Attached Files:

Changes:

Field Old Value Date By
ResolutionAccepted As Bug2011-06-19 10:14examachine