View Issue Details

IDProjectCategoryView StatusLast Update
0002494GNUnettestbed servicepublic2012-11-05 17:34
ReporterSree Harsha Totakura Assigned ToSree Harsha Totakura Due Date
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 14: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 14: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 14: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 15: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 ModifiedUsernameFieldChange
2012-07-09 22:19Sree Harsha TotakuraNew Issue
2012-07-10 14:04Christian GrothoffNote Added: 0006234
2012-07-10 14:10Christian GrothoffNote Added: 0006235
2012-07-10 14:13Christian GrothoffNote Added: 0006236
2012-07-10 14:17Christian GrothoffAssigned To => Sree Harsha Totakura
2012-07-10 14:17Christian GrothoffStatusnew => assigned
2012-07-10 14:17Christian GrothoffCategoryutil library => testbed service
2012-07-10 14:17Christian GrothoffSummarystdin 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 15:39Sree Harsha TotakuraNote Added: 0006237
2012-07-10 15:39Sree Harsha TotakuraStatusassigned => resolved
2012-07-10 15:39Sree Harsha TotakuraFixed in Version => Git master
2012-07-10 15:39Sree Harsha TotakuraResolutionopen => fixed
2012-07-17 22:07Christian GrothoffFixed in VersionGit master => 0.9.4
2012-07-17 22:07Christian GrothoffTarget Version => 0.9.4
2012-11-05 17:34Christian GrothoffStatusresolved => closed