Summary: | devel/urjtag: core dumps with Altera USB Blaster when libftdi1 is used in the async USB mode | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Torfinn Ingolfsen <tingox+freebsd> |
Component: | Individual Port(s) | Assignee: | Yuri Victorovich <yuri> |
Status: | New --- | ||
Severity: | Affects Only Me | Flags: | bugzilla:
maintainer-feedback?
(yuri) |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Torfinn Ingolfsen
2020-12-02 15:56:27 UTC
(In reply to Torfinn Ingolfsen from comment #0) Hi Torfinn, Thank you for your report. Are you able to run under the debugger and post a stack trace here? The easiest way to do this is: > sudo pkg delete libftdi1 urjtag && cd /usr/ports/devel/urjtag && WITH_DEBUG=yes make install > sudo pkg install gdb Then re-run the same urjtag command that crashes prefixed with /usr/local/bin/gdb and when it would crash type 'bt<Enter>' and post the stack trace here. Thank you, Yuri Here you go, one backtrace: jtag> cable usbblaster Connected to libftdi driver. jtag> detect Program received signal SIGSEGV, Segmentation fault. 0x0000000801783f31 in ftdi_transfer_data_done (tc=0x241c3f0) at src/ftdi.c:1888 1888 src/ftdi.c: No such file or directory. (gdb) bt #0 0x0000000801783f31 in ftdi_transfer_data_done (tc=0x241c3f0) at src/ftdi.c:1888 #1 0x0000000800a75390 in usbconn_ftdi_flush (p=0x8024362d0) at usbconn/libftdi.c:143 #2 0x0000000800a742ba in usbconn_ftdi_read (conn=0x80241fec0, buf=0x0, len=0) at usbconn/libftdi.c:180 #3 0x0000000800a5bdbd in urj_tap_usbconn_read (conn=0x80241fec0, buf=0x0, len=0) at usbconn.c:56 #4 0x0000000800a60380 in urj_tap_cable_cx_xfer (cmd_root=0x8024a1150, out_cmd=0x0, cable=0x80243b060, how_much=URJ_TAP_CABLE_TO_OUTPUT) at cable/cmd_xfer.c:336 #5 0x0000000800a67d24 in usbblaster_flush (cable=0x80243b060, how_much=URJ_TAP_CABLE_TO_OUTPUT) at cable/usbblaster.c:431 #6 0x0000000800a5c0d3 in urj_tap_cable_flush (cable=0x80243b060, how_much=URJ_TAP_CABLE_TO_OUTPUT) at cable.c:111 #7 0x0000000800a5d08e in urj_tap_cable_transfer_late (cable=0x80243b060, out=0x8024a1180 "") at cable.c:439 #8 0x0000000800a562a8 in urj_tap_shift_register_output (chain=0x80241b040, in=0x80241ff80, out=0x80241ff60, tap_exit=0) at tap.c:141 #9 0x0000000800a55faf in urj_tap_shift_register (chain=0x80241b040, in=0x80241ff80, out=0x80241ff60, tap_exit=0) at tap.c:152 #10 0x0000000800a5b3da in urj_tap_detect_register_size (chain=0x80241b040, maxlen=1024) at discovery.c:81 #11 0x0000000800a59347 in urj_tap_detect_parts (chain=0x80241b040, db_path=0x800b0ad98 "/usr/local/share/urjtag", maxirlen=0) at detect.c:197 #12 0x0000000800a5afc9 in urj_tap_detect (chain=0x80241b040, maxirlen=0) at detect.c:549 #13 0x0000000800ab60cb in cmd_detect_run (chain=0x80241b040, params=0x8024a1170) at cmd_detect.c:52 #14 0x0000000800abefa5 in urj_cmd_run (chain=0x80241b040, params=0x8024a1170) at cmd_cmd.c:276 #15 0x0000000800ac6a3f in urj_parse_line (chain=0x80241b040, line=0x802420178 "detect") at parse.c:165 #16 0x0000000000402929 in jtag_readline_multiple_commands_support (chain=0x80241b040, line=0x802420178 "detect") at jtag.c:249 #17 0x00000000004024f5 in jtag_readline_loop (chain=0x80241b040, prompt=0x403159 "jtag> ") at jtag.c:271 #18 0x00000000004021b5 in main (argc=1, argv=0x7fffffffeb10) at jtag.c:573 (gdb) What version of libftdi do you have? A commit references this bug: Author: yuri Date: Wed Dec 2 21:05:56 UTC 2020 New revision: 556853 URL: https://svnweb.freebsd.org/changeset/ports/556853 Log: devel/urjtag: Add the NOASYNC option to possibly work around bugs like bug#251533 PR: 251533 Reported by: Torfinn Ingolfsen <tingox+freebsd@gmail.com> Changes: head/devel/urjtag/Makefile Torfinn, I added the new option NOASYNC to devel/urjtag. Could you please update this port, select this option (NOASYNC=ON), rebuild, and see if it still crashes? This option is not made user-choosable by urjtag, but they test if it is supported in libftdi and enable it internally. The code that crashes for you is conditional on this option. Thank you, Yuri (In reply to Yuri Victorovich from comment #3) root@kg-core1# pkg info libftdi* libftdi-0.20_16 libftdi1-1.5_1 (In reply to Yuri Victorovich from comment #5) with updated port and NOASYNC ON: root@kg-core1# pkg info urjtag* urjtag-2019.12_2 root@kg-core1# pkg options urjtag urjtag - FTDI: on urjtag - JEDEC: on urjtag - NLS: on urjtag - NOASYNC: on urjtag - PYTHON: off urjtag - USB: on tingo@kg-core1$ jtag UrJTAG 2019.12 # Copyright (C) 2002, 2003 ETC s.r.o. Copyright (C) 2007, 2008, 2009 Kolja Waschk and the respective authors UrJTAG is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for UrJTAG. warning: UrJTAG may damage your hardware! Type "quit" to exit, "help" for help. jtag> cable usbblaster Connected to libftdi driver. jtag> bsdl path /home/tingo/doc/Altera/docs/fpga/bsdl/ jtag> detect IR length: 10 Chain length: 1 Device Id: 00000010000010110001000011011101 (0x020B10DD) Filename: /home/tingo/doc/Altera/docs/fpga/bsdl//EP2C5T144.BSD jtag> urjtag now works. Thank you, very fast response and work. (In reply to Torfinn Ingolfsen from comment #7) > urjtag now works. Thank you, very fast response and work. My pleasure! Notified the upstream mailing list libftdi@developer.intra2net.com on Dec 02, 2020. |