Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation fault in connect with multiple threads #211

Closed
jakobj opened this issue Jan 21, 2016 · 3 comments
Closed

segmentation fault in connect with multiple threads #211

jakobj opened this issue Jan 21, 2016 · 3 comments

Comments

@jakobj
Copy link
Contributor

jakobj commented Jan 21, 2016

using multiple threads, when calling connect with a mixture of neuron and devices, a segmentation fault occurs as threads create connections in non-thread-local sparse tables.
the following lines will generate a segmentation fault:

0 << /total_num_virtual_procs 2 /print_time false >> SetStatus

/n1 /iaf_psc_delta Create def
/n2 /iaf_psc_delta Create def
/n3 /iaf_psc_delta Create def

/sd /spike_detector Create def

[n1 n1] [sd n3] Connect

in this case thread0 and thread1 both try to create a connection in the connector of neuron 1 on thread 1. this can be traced back to the use of get_node(gid, thread) in the connection builders (AllToAllBuilder etc.) which defaults to thread=0 if no argument is given.
most likely this bug was not ecountered before since users rarely mix devices and neurons in a single list. the segmentation fault occurs with 2.10.0, 2.8.0, 2.6.0 and i did not go back further in time.

am i right in assuming this is not the desired behaviour?

ps: i am now working on a fix based on the nest3 branch.

@jakobj
Copy link
Contributor Author

jakobj commented Jan 23, 2016

there still seem to be old connection routines like DivergentConnect in the connection_builder_manager. i thought these were completely replaced by the new connect framework? does it make sense to fix them aswell as they exist for a good reason or should i ignore them? @heplesser @hannahbos

@jougs
Copy link
Contributor

jougs commented Jan 23, 2016

We decided to do the restructuring first and then clean up for the release once everything is in master.

@heplesser
Copy link
Contributor

This has been fixed by #221, thus closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants