Skip to content

Race condition between thread spawn and send #9

Description

@patengelbert

If a thread has not yet spawned when a send to it occurs, the program crashes. This is most apparent in a large number of threads (7 in this example).

[00000002] HARD : Thread/0x00000002 : Opening socket /tmp/tinsel_on_unix.XXN9Qqbk/00000002

[00000000] HARD : Thread/0x00000000 : Opening socket /tmp/tinsel_on_unix.XXN9Qqbk/00000000

[00000001] HARD : Thread/0x00000001 : Opening socket /tmp/tinsel_on_unix.XXN9Qqbk/00000001

[00000002] HARD : / in : Starting incoming thread
[00000003] HARD : Thread/0x00000003 : Opening socket /tmp/tinsel_on_unix.XXN9Qqbk/00000003

[00000002] HARD : Thread/0x00000002/cpu : Starting soft-switch
[00000002] SOFT : softswitch_main()
softswitch_init
softswitch_init - init device
softswitch_init - looking for init
[00000002] HARD : / out : Starting outgoing thread
[00000001] HARD : / in : Starting incoming thread
[00000000] HARD : / in : Starting incoming thread
[00000002] SOFT : starting loop
sendto/error: No such file or directory
dst=/tmp/tinsel_on_unix.XXN9Qqbk/00000004
[00000004] HARD : Thread/0x00000004 : Opening socket /tmp/tinsel_on_unix.XXN9Qqbk/00000004

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions