Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#455 closed defect (fixed)

TCP uses threads in an unsupported way

Reported by: Jakub Jermář Owned by: Jiri Svoboda
Priority: minor Milestone: 0.5.0
Component: helenos/net/tcp Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

tcp_rqueue_thread_start() creates an instance of the tcp_rqueue_thread thread. The idea is probably to dedicate the new thread entirely to this funtion. However, since the functions called from it, such as tcp_as_segment_arrived(), use fibril synchonization, it is likely that the thread will execute other fibrils too. It will gradually become just another execution unit for running fibrils.

Change History (6)

comment:1 Changed 7 years ago by Jiri Svoboda

Priority: majorminor

tcp_rqueue_thread needs to run in background. It could be achieved using just a new fibril. My idea indeed was that if I create it as a thread, it could potentially run in parallel on MP. You are right that this in fact just creates a new worker thread, so the better thing to do would be to create just a fibril.

This, by the way, means that you will almost never create non-worker threads, except for some very rare situations.

comment:2 Changed 7 years ago by Jakub Jermář

I actually suspect this may be causing TCP hangs. When running tester malloc1 test over telnet or when downloading a multi-megabyte file using HTTP, TCP sometimes hangs. Taskdump shows three threads waiting in one of the manager fibrils.

comment:3 Changed 7 years ago by Jiri Svoboda

How would that be possible? Shouldn't the net effect of this be just multiple worker threads? If it caused hangs, there would be something rotten… Anyway, fixed in mainline,1487 You can try and see if the symptoms persist. Btw. how can remcons be working? It should not work due to #456.

Last edited 7 years ago by Jiri Svoboda (previous) (diff)

comment:4 Changed 7 years ago by Jiri Svoboda

Resolution: fixed
Status: newclosed

comment:5 in reply to:  3 Changed 7 years ago by Jakub Jermář

Replying to svoboda:

How would that be possible? Shouldn't the net effect of this be just multiple worker threads? If it caused hangs, there would be something rotten…

True, we will need to look at that separately.

comment:6 Changed 7 years ago by Jakub Jermář

Milestone: 0.5.10.5.0
Note: See TracTickets for help on using tickets.