Good afternoon, I hope everyone is well.
Nanos is multi-threaded. However, it can’t create threads with pthread_create. Does the thread implementation method use anything specific?
Thank you very much!
samuel@samuel-virtual-machine:~/Desktop/Apps/jitterdebugger$ ops run jitterdebugger
running local instance
booting /home/samuel/.ops/images/jitterdebugger ...
en1: assigned 10.0.2.15
affinity: 0 = 1 [0x1]
jitterdebugger.c:start_measuring(): pthread_create(): Function not implemented
I took a quick look at jitterdebugger and you are more than likely running into the fact that it forks in a few places - those would need to be patched for it to work as we explicitly do not support fork/exec on purpose.
It’s working! Thank you very much!
It turns out that in the Jitterdebugger version, pthread_create receives the arguments, &attr, where they come with errors and Nanos can’t resolve them, different from linux and so on. If you set it to NULL, it works!
// old
err = pthread_create(&s[i].pid, &attr, &worker, &s[i]);
// new
err = pthread_create(&s[i].pid, NULL, &worker, &s[i]);
Thank you! With respect to the forks, this has been controlled and avoided. Thank you!