[erlang-bugs] case_clause in io:put_chars during common test run
Siri Hansen
erlangsiri@REDACTED
Wed Feb 27 12:32:12 CET 2013
Hi Nico - nice to see that you found the problem.
There have been some changes to the logging mechanism in test_server,
mainly to ensure that output is sent to the correct log when running
parallel test cases. The unexpected I/O log is also added - it will be used
if it can not be decided which test case a particular printout is related
to. However, I don't think any of these changes could cause the problem you
see.
The process which is killed is probably the file descriptor process for the
html log for end_per_suite (as you kill processes in the post_end_per_suite
hook function), and this log has always been opened at the same time as
end_per_suite - i.e. way after you collect your original set of processes.
I would rather think that there is something in your filtering that does no
longer work - maybe the timing has changed a bit so you more often(?) get
current function of the file descriptor process to be something other than
file_io_server... ?? I'm just guessing now...
Anyway - I think the way to filter out such processes would be to check if
it is a file descriptor and possibly check if the file name starts with
your test suite name (file:pid2name/2). At least that's the only thing I
can come up with right now...
Good luck!
/siri
2013/2/26 Nico Kruber <nico.kruber@REDACTED>
> Hi Siri,
> Thank you for looking into this but, I just found the code responsible for
> the
> error - on our side:
>
> At the end of each test suite (via a common test hook) we kill all
> processes
> that have not been running before the suite was started (to make sure that
> previous test suites don't influence new ones). This includes processes
> spawned without linking to the originating process - the rest is already
> killed by common test.
>
> There are some exceptions and apparently something changed and we killed
> too
> many processes. In this case it was the following:
> initial_call: {erlang,apply,2},
> current_function: {prim_file,drv_get_response,1}
>
> There is no safe way to filter that process out (based on current_function
> or
> any other process_info I'm aware of) and I'd rather use some common test
> functionality isolating test suites but so far I'm not aware of any...
> -> this would be a useful extension to common test though
>
>
> Nico
>
> On Tuesday 26 Feb 2013 16:32:52 Siri Hansen wrote:
> > Hi Nico - it looks like the test case HTML log has been terminated
> somehow.
> > I'm not sure how this could have happened, but it was terminated prior to
> > the error printout seen below. Could you please have a look at
> >
> > 1. the "common test framework log" - (ctlog.html in the ct_run.xxxx
> > directory)
> > 2. the unexpected io log (there is a link to this from the index page
> where
> > all test cases are listed - or "find unexpected_io.log.html")
> >
> > to see if there is anything that could give a hint?
> >
> > Also the test case log where this happened is interesting of course.
> >
> > Thanks!
> > /siri@REDACTED
> >
> >
> > 2013/2/26 Nico Kruber <nico.kruber@REDACTED>
> >
> > > In current Erlang master I get a case_clause in io:put_chars running
> > > Scalaris
> > > unit tests (we use common test here). The actual test suite at which
> this
> > > happens varies though.
> > > Here are two logs:
> > >
> > > -------------------------------
> > > EXIT, reason {terminated,
> > >
> > > [{io,put_chars,
> > >
> > > [<0.25486.1>,unicode,
> > >
> > > [60,47,112,114,101,62,10,"<center>\n<br /><hr
> > >
> > > /><p>\n",
> > >
> > > "<a href=\"","../../../all_runs.html",
> > > "\">Test run history\n</a> | ","<a href=\"",
> > > "../../../index.html",
> > > "\">Top level test index\n</a>\n</p>\n",
> > > ["<div class=\"copyright\">","Copyright ©
> ",
> > >
> > > "2013"," <a href=\"http://www.erlang.org\">",
> > > "Open Telecom Platform</a><br />\n",
> > > "Updated: <!date>","Tue Feb 26 2013 06:35:39",
> > > "<!/date>","<br />\n</div>\n"],
> > >
> > > "</center>\n</body>\n</html>\n"]],
> > >
> > > []},
> > >
> > > {test_server_ctrl,stop_minor_log_file,0,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1815}]},
> > >
> > > {test_server_ctrl,run_test_cases_loop,5,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,2741}]},
> > >
> > > {test_server_ctrl,run_test_cases,3,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,2086}]},
> > >
> > > {test_server_ctrl,ts_tc,3,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1231}]},
> > >
> > > {test_server_ctrl,init_tester,10,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1192}]}]}Updating
> > > /home/buildbot/scalaris-full-slave/full-dev/build/index.html... done
> > > Updating
> > > /home/buildbot/scalaris-full-slave/full-dev/build/all_runs.html...
> > > done
> > > Test run crashed! This could be an internal error - please report!
> > >
> > > {{case_clause,
> > >
> > > {value,
> > >
> > > {'EXIT',
> > >
> > > {terminated,
> > >
> > > [{io,put_chars,
> > >
> > > [<0.25486.1>,unicode,
> > >
> > > [60,47,112,114,101,62,10,"<center>\n<br /><hr
> > >
> > > /><p>\n",
> > >
> > > "<a href=\"","../../../all_runs.html",
> > > "\">Test run history\n</a> | ","<a href=\"",
> > > "../../../index.html",
> > > "\">Top level test index\n</a>\n</p>\n",
> > > ["<div class=\"copyright\">","Copyright ©
> ",
> > >
> > > "2013"," <a href=\"http://www.erlang.org\">",
> > > "Open Telecom Platform</a><br />\n",
> > > "Updated: <!date>","Tue Feb 26 2013 06:35:39",
> > > "<!/date>","<br />\n</div>\n"],
> > >
> > > "</center>\n</body>\n</html>\n"]],
> > >
> > > []},
> > >
> > > {test_server_ctrl,stop_minor_log_file,0,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1815}]},
> > >
> > > {test_server_ctrl,run_test_cases_loop,5,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,2741}]},
> > >
> > > {test_server_ctrl,run_test_cases,3,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,2086}]},
> > >
> > > {test_server_ctrl,ts_tc,3,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1231}]},
> > >
> > > {test_server_ctrl,init_tester,10,
> > >
> > >
> [{file,"test_server_ctrl.erl"},{line,1192}]}]}}}},
> > >
> > > [{ct_run,execute_all_specs,4,[{file,"ct_run.erl"},{line,433}]},
> > >
> > > {ct_run,script_start1,2,[{file,"ct_run.erl"},{line,352}]}]}
> > >
> > > -------------------------------
> > > EXIT, reason {terminated,
> > >
> > > [{io,put_chars,
> > >
> > > [<0.17599.5>,unicode,
> > >
> > > [60,47,112,114,101,62,10,"<center>\n<br /><hr
> > >
> > > /><p>\n",
> > >
> > > "<a href=\"","../../../all_runs.html",
> > > "\">Test run history\n</a> | ","<a href=\"",
> > > "../../../index.html",
> > > "\">Top level test index\n</a>\n</p>\n",
> > > ["<div class=\"copyright\">","Copyright ©
> ",
> > >
> > > "2013"," <a href=\"http://www.erlang.org\">",
> > > "Open Telecom Platform</a><br />\n",
> > > "Updated: <!date>","Tue Feb 26 2013 14:10:02",
> > > "<!/date>","<br />\n</div>\n"],
> > >
> > > "</center>\n</body>\n</html>\n"]],
> > >
> > > []},
> > >
> > > {test_server_ctrl,stop_minor_log_file,0,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1815}]},
> > >
> > > {test_server_ctrl,run_test_cases_loop,5,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,2741}]},
> > >
> > > {test_server_ctrl,run_test_cases,3,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,2086}]},
> > >
> > > {test_server_ctrl,ts_tc,3,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1231}]},
> > >
> > > {test_server_ctrl,init_tester,10,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1192}]}]}Updating
> > > /home/bzckrube/scalaris/index.html... done
> > > Updating /home/bzckrube/scalaris/all_runs.html... done
> > >
> > > =ERROR REPORT==== 26-Feb-2013::14:10:02 ===
> > > Error in process <0.35.0> on node 'ct@REDACTED' with exit value:
> > >
> > >
> {{case_clause,{value,{'EXIT',{terminated,[{io,put_chars,[<0.17599.5>,unico
> > > de, [60,47,112,114,101,62,10,"<center>\n<br /><hr /><p>\n","<a
> > > href=\"","../../../all_runs.html","\">Test run history\n</a> | ","<a
> > > href=\"","../../../index.html","\">Top lev...
> > >
> > > Test run crashed! This could be an internal error - please report!
> > >
> > > {{case_clause,
> > >
> > > {value,
> > >
> > > {'EXIT',
> > >
> > > {terminated,
> > >
> > > [{io,put_chars,
> > >
> > > [<0.17599.5>,unicode,
> > >
> > > [60,47,112,114,101,62,10,"<center>\n<br /><hr
> > >
> > > /><p>\n",
> > >
> > > "<a href=\"","../../../all_runs.html",
> > > "\">Test run history\n</a> | ","<a href=\"",
> > > "../../../index.html",
> > > "\">Top level test index\n</a>\n</p>\n",
> > > ["<div class=\"copyright\">","Copyright ©
> ",
> > >
> > > "2013"," <a href=\"http://www.erlang.org\">",
> > > "Open Telecom Platform</a><br />\n",
> > > "Updated: <!date>","Tue Feb 26 2013 14:10:02",
> > > "<!/date>","<br />\n</div>\n"],
> > >
> > > "</center>\n</body>\n</html>\n"]],
> > >
> > > []},
> > >
> > > {test_server_ctrl,stop_minor_log_file,0,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1815}]},
> > >
> > > {test_server_ctrl,run_test_cases_loop,5,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,2741}]},
> > >
> > > {test_server_ctrl,run_test_cases,3,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,2086}]},
> > >
> > > {test_server_ctrl,ts_tc,3,
> > >
> > > [{file,"test_server_ctrl.erl"},{line,1231}]},
> > >
> > > {test_server_ctrl,init_tester,10,
> > >
> > >
> [{file,"test_server_ctrl.erl"},{line,1192}]}]}}}},
> > >
> > > [{ct_run,execute_all_specs,4,[{file,"ct_run.erl"},{line,433}]},
> > >
> > > {ct_run,script_start1,2,[{file,"ct_run.erl"},{line,352}]}]}
> > >
> > > -------------------------------
> > >
> > > to test, checkout Scalaris from
> > > http://scalaris.googlecode.com/svn/trunk/then configure && make test
> > >
> > > Regards
> > > Nico
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20130227/35e6c2a0/attachment.htm>
More information about the erlang-bugs
mailing list