Page MenuHomePhabricator

Fix TestGdbRemote* on remote Linux
ClosedPublic

Authored by tberghammer on Mar 19 2015, 11:11 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

tberghammer retitled this revision from to Fix TestGdbRemote* on remote Linux.
tberghammer updated this object.
tberghammer edited the test plan for this revision. (Show Details)
tberghammer added a reviewer: vharron.
tberghammer added a subscriber: Unknown Object (MLST).
vharron edited edge metadata.Mar 26 2015, 11:23 AM

Is fixes the test but I'm getting these stack traces prints. What do they mean? (I'm in calibration now)

vharron@tifa:~/ll/svn/llvm/tools/lldb/test$ ./dotest.py -m --executable $HOME/ll/svn/build/host/bin/lldb -s $HOME/ll/svn/build/host/lldb-test-traces -A x86_64 -C clang-3.5 -u CFLAGS -u CXXFLAGS --platform-name remote-linux --platform-url connect://192.168.100.130:5432 --platform-working-dir /tmp -p TestLldbGdbServer.py
LLDB library dir: /usr/local/google/home/vharron/ll/svn/build/host/bin
lldb version 3.7.0 ( https://vharron@llvm.org/svn/llvm-project/lldb/trunk revision 233281 clang revision 233281 llvm revision 233281)
Setting up remote platform 'remote-linux'
Connecting to remote platform 'remote-linux' at 'connect://192.168.100.130:5432'...
Connected.
Setting remote platform working directory to '/tmp'...
lldb.pre_flight: None
lldb.post_flight: None

Session logs for test failures/errors/unexpected successes will go into directory '/usr/local/google/home/vharron/ll/svn/build/host/lldb-test-traces'
Command invoked: ./dotest.py -m --executable /usr/local/google/home/vharron/ll/svn/build/host/bin/lldb -s /usr/local/google/home/vharron/ll/svn/build/host/lldb-test-traces -A x86_64 -C clang-3.5 -u CFLAGS -u CXXFLAGS --platform-name remote-linux --platform-url connect://192.168.100.130:5432 --platform-working-dir /tmp -p TestLldbGdbServer.py
compilers=['clang-3.5']

Configuration: arch=x86_64 compiler=clang-3.5

Collected 69 tests

.=success F=fail E=error s=skipped x=expected-fail u=unexpected-success

sus.s.s.s.s.swarning: output queue entries still exist:
\x00\x00

from here:

File "./dotest.py", line 1805, in <module>
  resultclass=LLDBTestResult).run(suite)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/runner.py", line 162, in run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 64, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 84, in run
  self._wrapped_run(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 114, in _wrapped_run
  test._wrapped_run(result, debug)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 116, in _wrapped_run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 415, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 357, in run
  testMethod()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 513, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 221, in test_c_packet_works_llgs_dwarf
  self.c_packet_works()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 207, in c_packet_works
  self.expect_gdbremote_sequence()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/gdbremote_testcase.py", line 517, in expect_gdbremote_sequence
  return expect_lldb_gdbserver_replay(self, self.sock, self.test_sequence, timeout_seconds, self.logger)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/lldbgdbserverutils.py", line 252, in expect_lldb_gdbserver_replay
  context["O_content"] = pump.get_accumulated_output()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/socket_packet_pump.py", line 69, in __exit__
  traceback.print_stack()

.s.s.swarning: output queue entries still exist:
\x00\x00

from here:

File "./dotest.py", line 1805, in <module>
  resultclass=LLDBTestResult).run(suite)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/runner.py", line 162, in run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 64, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 84, in run
  self._wrapped_run(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 114, in _wrapped_run
  test._wrapped_run(result, debug)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 116, in _wrapped_run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 415, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 357, in run
  testMethod()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 513, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 158, in test_inferior_exit_0_llgs_dwarf
  self.inferior_exit_0()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 144, in inferior_exit_0
  self.expect_gdbremote_sequence()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/gdbremote_testcase.py", line 517, in expect_gdbremote_sequence
  return expect_lldb_gdbserver_replay(self, self.sock, self.test_sequence, timeout_seconds, self.logger)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/lldbgdbserverutils.py", line 252, in expect_lldb_gdbserver_replay
  context["O_content"] = pump.get_accumulated_output()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/socket_packet_pump.py", line 69, in __exit__
  traceback.print_stack()

.swarning: output queue entries still exist:
\x00\x00

from here:

File "./dotest.py", line 1805, in <module>
  resultclass=LLDBTestResult).run(suite)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/runner.py", line 162, in run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 64, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 84, in run
  self._wrapped_run(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 114, in _wrapped_run
  test._wrapped_run(result, debug)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 116, in _wrapped_run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 415, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 357, in run
  testMethod()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 513, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 192, in test_inferior_exit_42_llgs_dwarf
  self.inferior_exit_42()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 178, in inferior_exit_42
  self.expect_gdbremote_sequence()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/gdbremote_testcase.py", line 517, in expect_gdbremote_sequence
  return expect_lldb_gdbserver_replay(self, self.sock, self.test_sequence, timeout_seconds, self.logger)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/lldbgdbserverutils.py", line 252, in expect_lldb_gdbserver_replay
  context["O_content"] = pump.get_accumulated_output()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/socket_packet_pump.py", line 69, in __exit__
  traceback.print_stack()

.swarning: output queue entries still exist:
hello, world\r\nhe

from here:

File "./dotest.py", line 1805, in <module>
  resultclass=LLDBTestResult).run(suite)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/runner.py", line 162, in run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 64, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 84, in run
  self._wrapped_run(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 114, in _wrapped_run
  test._wrapped_run(result, debug)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 116, in _wrapped_run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 415, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 357, in run
  testMethod()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 513, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 255, in test_inferior_print_exit_llgs_dwarf
  self.inferior_print_exit()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 240, in inferior_print_exit
  context = self.expect_gdbremote_sequence()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/gdbremote_testcase.py", line 517, in expect_gdbremote_sequence
  return expect_lldb_gdbserver_replay(self, self.sock, self.test_sequence, timeout_seconds, self.logger)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/lldbgdbserverutils.py", line 252, in expect_lldb_gdbserver_replay
  context["O_content"] = pump.get_accumulated_output()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/socket_packet_pump.py", line 69, in __exit__
  traceback.print_stack()

.s.s.s.s.s.s.s.s.s..s.s.s.s.s.s.s.s.s.s.s.s.swarning: output queue entries still exist:
message: Hello, memoryX\r\nme

from here:

File "./dotest.py", line 1805, in <module>
  resultclass=LLDBTestResult).run(suite)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/runner.py", line 162, in run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 64, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 84, in run
  self._wrapped_run(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 114, in _wrapped_run
  test._wrapped_run(result, debug)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/suite.py", line 116, in _wrapped_run
  test(result)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 415, in __call__
  return self.run(*args, **kwds)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/unittest2/case.py", line 357, in run
  testMethod()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 513, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper
  return func(self, *args, **kwargs)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 1371, in test_written_M_content_reads_back_correctly_llgs_dwarf
  self.written_M_content_reads_back_correctly()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/TestLldbGdbServer.py", line 1349, in written_M_content_reads_back_correctly
  context = self.expect_gdbremote_sequence()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/gdbremote_testcase.py", line 517, in expect_gdbremote_sequence
  return expect_lldb_gdbserver_replay(self, self.sock, self.test_sequence, timeout_seconds, self.logger)
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/lldbgdbserverutils.py", line 252, in expect_lldb_gdbserver_replay
  context["O_content"] = pump.get_accumulated_output()
File "/usr/local/google/home/vharron/ll/svn/llvm/tools/lldb/test/tools/lldb-server/socket_packet_pump.py", line 69, in __exit__
  traceback.print_stack()

.

Ran 69 tests in 51.236s

OK (skipped=34, unexpected successes=1)
Session logs for test failures/errors/unexpected successes can be found in directory '/usr/local/google/home/vharron/ll/svn/build/host/lldb-test-traces'

test/tools/lldb-server/gdbremote_testcase.py
294 ↗(On Diff #22283)

MAX_CONNECT_ATTEMPTS

ted added a subscriber: ted.Mar 26 2015, 12:24 PM

I'm seeing less failures, but I'm still seeing some with this patch:

connect to debug monitor on port 14060 failed, attempt #18 of 20
connect to debug monitor on port 12030 failed, attempt #19 of 20
connect to debug monitor on port 15778 failed, attempt #20 of 20
FAIL: LLDB (/pkg/qct/software/llvm/build_tools/llvm34_140306/bin/clang-x86_64) :: test_attach_commandline_qProcessInfo_reports_correct_pid_llgs_dwarf (TestGdbRemoteProcessInfo.TestGdbRemoteProcessInfo)

@vharron: I see the same warnings without this CL also when running the tests for local debugging so it isn't a new warning. I am not sure where they are coming from but it looks like some of the tests don't expect $O packets (or expects less) while lldb-server sends them. We should probably investigate it but I think it is out of the scope of this CL.

@ted: I tried to reproduce the failure but I only managed to do it when running dosep.py with multiple threads. Doing it is not fully supported (yet) because lldb-platform drops some connection when a lot of incoming connection came in the same time what makes the test suit flaky. If you can reproduce the failure with running dotest.py (on 1 thread) or with running dosep.py with LLDB_TEST_THREADS=1 set then please let me know (with some details about how you did it) and I will investigate it further.

tberghammer edited edge metadata.

Fix typo

vharron accepted this revision.Mar 28 2015, 11:02 PM
vharron edited edge metadata.

Please submit at your early convenience!

This revision is now accepted and ready to land.Mar 28 2015, 11:02 PM
This revision was automatically updated to reflect the committed changes.