View Issue Details

IDProjectCategoryView StatusLast Update
0002494GNUnettestbed servicepublic2012-11-05 18:34
ReporterSree Harsha Totakura Assigned ToSree Harsha Totakura  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinux-x86OSUbuntuOS Version12.04
Product VersionGit master 
Target Version0.9.4Fixed in Version0.9.4 
Summary0002494: testbed_api test is misbehaving (was: stdin is closed in subprocesses started by GNUNET_OS_start_process_vap())
DescriptionAfter recent change SVN 22578 sub-processes started with GNUNET_OS_start_process_vap() don't seem to have an opened stdin. This is confirmed by testbed API function GNUNET_TESTBED_host_run_() in testbed_api_hosts.c which starts gnunet-service-arm as a sub-process through GNUNET_OS_start_process_vap().
Additional InformationWhen GNUNET_FORCE_LOG is set to "testbed*;;;;DEBUG/;;;;WARNING" it can be observed that gnunet-service-tested is restarted repeatedly when running test_testbed_api. Furthermore, the reason for the shutdown trigger in testbed service is observed to be stdin close. The repeated restarts are due to gnunet-arm restarting the service.
TagsNo tags attached.

Activities

Christian Grothoff

2012-07-10 16:04

manager   ~0006234

The reason is that this gnunet-service-testbed process is started by gnunet-service-arm and not from testbed_api_hosts.c. ARM is not supposed to pass a stdin to the services, thus this fails (even with my new code which passes /dev/null for stdin instead).

Changing 'testbed.conf' BINARY to /bin/true shows that it is really ARM starting the process and not testbed_api_hosts.c. Not sure why the testcase runs gnunet-service-testbed from ARM, as that should never be done. In fact, as testbed is not a regular service it should probably not have the arm-specific options in testbed.conf in the first place.

Christian Grothoff

2012-07-10 16:10

manager   ~0006235

Looking at test_testbed_api.c, the issue seems clear: the code should not begin with 'GNUNET_TESTING_peer_run' and start ARM and then try to use 'TESTBED_controller_connect'. Instead, TESTBED_controller_start should be used.

Christian Grothoff

2012-07-10 16:13

manager   ~0006236

GNUNET_TESTBED_controller_start API changed, doesn't it need to have 'cfg' as an argument!? The controller process needs to have a configuration...

Sree Harsha Totakura

2012-07-10 17:39

updater   ~0006237

Yes, the problem was with the test case. I was using GNUNET_TESTING_peer_run and making ARM to start the process as I wanted to debug the service. Without this we have to invent a new way to start the testbed service under gdb for debugging.

Issue History

Date Modified Username Field Change
2012-07-10 00:19 Sree Harsha Totakura New Issue
2012-07-10 16:04 Christian Grothoff Note Added: 0006234
2012-07-10 16:10 Christian Grothoff Note Added: 0006235
2012-07-10 16:13 Christian Grothoff Note Added: 0006236
2012-07-10 16:17 Christian Grothoff Assigned To => Sree Harsha Totakura
2012-07-10 16:17 Christian Grothoff Status new => assigned
2012-07-10 16:17 Christian Grothoff Category util library => testbed service
2012-07-10 16:17 Christian Grothoff Summary stdin is closed in subprocesses started by GNUNET_OS_start_process_vap() => testbed_api test is misbehaving (was: stdin is closed in subprocesses started by GNUNET_OS_start_process_vap())
2012-07-10 17:39 Sree Harsha Totakura Note Added: 0006237
2012-07-10 17:39 Sree Harsha Totakura Status assigned => resolved
2012-07-10 17:39 Sree Harsha Totakura Fixed in Version => Git master
2012-07-10 17:39 Sree Harsha Totakura Resolution open => fixed
2012-07-18 00:07 Christian Grothoff Fixed in Version Git master => 0.9.4
2012-07-18 00:07 Christian Grothoff Target Version => 0.9.4
2012-11-05 18:34 Christian Grothoff Status resolved => closed