Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean build fails in master, emit_go error in lcmgen #294

Open
ashuang opened this issue Nov 14, 2019 · 2 comments
Open

clean build fails in master, emit_go error in lcmgen #294

ashuang opened this issue Nov 14, 2019 · 2 comments
Assignees

Comments

@ashuang
Copy link
Member

ashuang commented Nov 14, 2019

Just tried building master, and lcm-gen fails in emit_go while building test types.

lcm-gen --c --c-cpath /home/albert/proj/lcm/build/test/types --c-hpath /home/albert/proj/lcm/build/test/types --c-export-symbol LCMTEST_EXPORT --c-export-include lcmtest_export.h --cpp --cpp-hpath /home/albert/proj/lcm/build/test/types --java --jpath /home/albert/proj/lcm/build/test/types --python --python-no-init --ppath /home/albert/proj/lcm/build/test/types --lua --lua-no-init --lpath /home/albert/proj/lcm/build/test/types --go --go-path /home/albert/proj/lcm/build/test/types/go/src /home/albert/proj/lcm/test/types/lcmtest/bools_t.lcm

(process:27533): GLib-CRITICAL **: 16:47:11.511: g_hash_table_destroy: assertion 'hash_table != NULL' failed
Segmentation fault (core dumped)

Backtraces to:

$ gdb lcmgen/lcm-gen 
GNU gdb (Ubuntu 8.1-0ubuntu3.1) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from lcmgen/lcm-gen...done.
(gdb) r  --c --c-cpath /home/albert/proj/lcm/build/test/types --c-hpath /home/albert/proj/lcm/build/test/types --c-export-symbol LCMTEST_EXPORT --c-export-include lcmtest_export.h --cpp --cpp-hpath /home/albert/proj/lcm/build/test/types --java --jpath /home/albert/proj/lcm/build/test/types --python --python-no-init --ppath /home/albert/proj/lcm/build/test/types --lua --lua-no-init --lpath /home/albert/proj/lcm/build/test/types --go --go-path /home/albert/proj/lcm/build/test/types/go/src /home/albert/proj/lcm/test/types/lcmtest/bools_t.lcm
Starting program: /home/albert/proj/lcm/build/lcmgen/lcm-gen --c --c-cpath /home/albert/proj/lcm/build/test/types --c-hpath /home/albert/proj/lcm/build/test/types --c-export-symbol LCMTEST_EXPORT --c-export-include lcmtest_export.h --cpp --cpp-hpath /home/albert/proj/lcm/build/test/types --java --jpath /home/albert/proj/lcm/build/test/types --python --python-no-init --ppath /home/albert/proj/lcm/build/test/types --lua --lua-no-init --lpath /home/albert/proj/lcm/build/test/types --go --go-path /home/albert/proj/lcm/build/test/types/go/src /home/albert/proj/lcm/test/types/lcmtest/bools_t.lcm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

(process:27560): GLib-CRITICAL **: 16:48:12.551: g_hash_table_destroy: assertion 'hash_table != NULL' failed

Program received signal SIGSEGV, Segmentation fault.
0x000055555556d32b in __lcm_recursive_fingerprint (lcm=0x5555557a6370, ls=0x0, fs=0x0) at /home/albert/proj/lcm/lcmgen/emit_go.c:259
259	    uint64_t fingerprint = ls->hash;
(gdb) bt
#0  0x000055555556d32b in __lcm_recursive_fingerprint (lcm=0x5555557a6370, ls=0x0, fs=0x0) at /home/albert/proj/lcm/lcmgen/emit_go.c:259
#1  0x000055555556d482 in lcm_get_fingerprint (lcm=0x5555557a6370, ls=0x0) at /home/albert/proj/lcm/lcmgen/emit_go.c:292
#2  0x000055555556f0ea in emit_go_array_loops (f=0x5555557a6470, lcm=0x5555557a6370, ls=0x5555557a7f10, lm=0x5555557a84d0, arraystr=0x5555557a1da0, 
    slice_emit=1, end=1, fingerprint=0) at /home/albert/proj/lcm/lcmgen/emit_go.c:571
#3  0x0000555555570578 in emit_go_lcm_deep_copy (f=0x5555557a6470, lcm=0x5555557a6370, ls=0x5555557a7f10, gotype=0x5555557ab9f0 "LcmtestBoolsT", fingerprint=0)
    at /home/albert/proj/lcm/lcmgen/emit_go.c:861
#4  0x0000555555574614 in emit_go_lcm (lcm=0x5555557a6370, ls=0x5555557a7f10, dir=0x5555557a7cc0 "/home/albert/proj/lcm/build/test/types/go/src/lcmtest/", 
    fingerprint=0) at /home/albert/proj/lcm/lcmgen/emit_go.c:1397
#5  0x0000555555575ee3 in emit_go (lcm=0x5555557a6370) at /home/albert/proj/lcm/lcmgen/emit_go.c:1648
#6  0x000055555558a7cf in main (argc=28, argv=0x7fffffffe0b8) at /home/albert/proj/lcm/lcmgen/main.c:175
@ashuang
Copy link
Member Author

ashuang commented Nov 14, 2019

I've disabled golang in master for now

hoxell added a commit to hoxell/lcm that referenced this issue Jan 10, 2020
Add check if member is primitive type before calling lcm_find_struct()
@hoxell hoxell mentioned this issue Jan 10, 2020
hoxell added a commit to hoxell/lcm that referenced this issue Jan 10, 2020
* Add check if:
  - fingerprint suffix is requested, and
  - member is primitive type

If not, don't bother calling lcm_find_struct() when creating array
gustafj added a commit that referenced this issue Feb 10, 2020
Enable build of golang backend (by revert of 6e5da12) and fix the
broken golang test due to missing header files and lib (by installing
lcm after successful build).
gustafj added a commit that referenced this issue Feb 11, 2020
Fixed #294 by the prior revert of 6e5da12. Enable build of golang
backend and fixed the broken golang tests by: added explicit path to
header files and lib, set the LCM backend queue size to prevent message
drops (as we are handling buffering, potential drops & drop count),
enabled verification of ordering of messages in the golang unit tests,
wrapped lcm_handle() with a select as it was reading on invalid handle
after destroy() is called.
gustafj added a commit that referenced this issue Feb 11, 2020
Fixed #294 by the prior revert of 6e5da12. Enable build of golang
backend and fixed the broken golang tests by: added explicit path to
header files and lib, set the LCM backend queue size to prevent message
drops (as we are handling buffering, potential drops & drop count),
enabled verification of ordering of messages in the golang unit tests,
wrapped lcm_handle() with a select as it was reading on invalid handle
after destroy() is called.
gustafj added a commit that referenced this issue Feb 11, 2020
Fixed #294 by the prior revert of 6e5da12.

Fixed the broken golang tests by:

* Added explicit path to header files and lib
* Set the LCM backend queue size to 0 to prevent message drops (as we
  are handling buffering, potential drops & drop count)
* Enabled verification of ordering of messages in the golang unit tests
* Wrapped lcm_handle() with a select as it was reading on invalid
  handle after destroy() is called.

Enable build of golang backend and set required go version to 1.11,
might work with older versions but Travis fails and its untested.
gustafj added a commit that referenced this issue Feb 11, 2020
Fixed #294 by the prior revert of 6e5da12.

Fixed the broken golang tests by:

* Added explicit path to header files and lib
* Set the LCM backend queue size to 0 to prevent message drops (as we
  are handling buffering, potential drops & drop count)
* Enabled verification of ordering of messages in the golang unit tests
* Wrapped lcm_handle() with a select as it was reading on invalid
  handle after destroy() is called.

Enable build of golang backend and set required go version to 1.10,
might work with older versions but Travis fails and its untested.
gustafj added a commit that referenced this issue Feb 11, 2020
Fixed #294 by the prior revert of 6e5da12.

Fixed the broken golang tests by:

* Added explicit path to header files and lib
* Set the LCM backend queue size to 0 to prevent message drops (as we
  are handling buffering, potential drops & drop count)
* Enabled verification of ordering of messages in the golang unit tests
* Wrapped lcm_handle() with a select as it was reading on invalid
  handle after destroy() is called.

Enable build of golang backend and set required go version to 1.10,
might work with older versions but Travis fails and its untested.
gustafj added a commit that referenced this issue Feb 11, 2020
Fixed #294 by the prior revert of 6e5da12.

Fixed the broken golang tests by:

* Added explicit path to header files and lib
* Set the LCM backend queue size to 0 to prevent message drops (as we
  are handling buffering, potential drops & drop count)
* Enabled verification of ordering of messages in the golang unit tests
* Wrapped lcm_handle() with a select as it was reading on invalid
  handle after destroy() is called.

Enable build of golang backend and set required go version to 1.10,
might work with older versions but Travis fails and its untested.
gustafj added a commit that referenced this issue Feb 11, 2020
Fixed #294 by the prior revert of 6e5da12.

Fixed the broken golang tests by:

* Added explicit path to header files and lib
* Set the LCM backend queue size to 0 to prevent message drops (as we
  are handling buffering, potential drops & drop count)
* Enabled verification of ordering of messages in the golang unit tests
* Wrapped lcm_handle() with a select as it was reading on invalid
  handle after destroy() is called.

Enable build of golang backend and set required go version to 1.10,
might work with older versions but Travis fails and its untested.
@gustafj
Copy link
Member

gustafj commented Feb 11, 2020

This is fixed in #310, but the Travis tests are unfortunately not yet all passing.
Hopefully just one last issue left, its run_client_server_test.py that fails to start sometimes, @ashuang have you seen this in other places? I don't see how it is tied to the go wrapper as it does not even start up.
And then one occurrence of message delivery failed resulting in timeout.

Fails to start
https://travis-ci.com/lcm-proj/lcm/jobs/286031876

Timeout
https://travis-ci.com/lcm-proj/lcm/jobs/286031875

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants