dynamips icon indicating copy to clipboard operation
dynamips copied to clipboard

JIT compiler causes crashes on FreeBSD 11.1 11.2 RELEASE

Open openssservices opened this issue 8 years ago • 1 comments

When running dynamips it crashes every time with the following error:

blades@ryzen:~/GNS3/images/IOS % dynamips c7200-adventerprisek9-mz.124-11.t1.image Cisco Router Simulation Platform (version 0.2.16-amd64/FreeBSD stable) Copyright (c) 2005-2011 Christophe Fillot. Build date: Sep 4 2017 10:42:56

IOS image file: c7200-adventerprisek9-mz.124-11.t1.image

CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb. NVRAM is empty, setting config register to 0x2142 C7200 instance 'default' (id 0): VM Status : 0 RAM size : 256 Mb IOMEM size : 0 Mb NVRAM size : 128 Kb NPE model : npe-400 Midplane : vxr IOS image : c7200-adventerprisek9-mz.124-11.t1.image

Loading ELF file 'c7200-adventerprisek9-mz.124-11.t1.image'... ELF entry point: 0x80008000

C7200 'default': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled. ROMMON emulation microcode.

Bus error (core dumped)

gdb show the following: (gdb) down #4 0x0000000801268c4b in strftime_l (s=0x7fffde5f0ca8 "Sep ", maxsize=, format=0x48c14d "%b %d %H:%M:%S", t=0x7fffde5f0c70, loc=0x80151b3e8) at /usr/src/lib/libc/stdtime/strftime.c:99 99 p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn, loc); (gdb) down #3 0x0000000801268e8a in fmt (format=, t=0x7fffde5f0c70, pt=0x7fffde5f0cac "", ptlim=0x7fffde5f0da8 "�\231�^\003�\025^", warnp=0x7fffde5f0c14, loc=0x80151b3e8) at /usr/src/lib/libc/stdtime/strftime.c:595 595 (void) sprintf_l(buf, loc, format, n); (gdb) down #2 0x00000008012bec51 in sprintf_l (str=, locale=, fmt=) at /usr/src/lib/libc/stdio/sprintf.c:70 70 ret = vsprintf_l(str, locale, fmt, ap); (gdb) down #1 0x00000008012c0f76 in vsprintf_l (str=0x7fffde5f0b88 "�\v��\177", locale=0x80151b3e8, fmt=0x8012e4d30 "%02d", ap=0x7fffde5f0ac8) at /usr/src/lib/libc/stdio/vsprintf.c:60 60 ret = __vfprintf(&f, locale, fmt, ap); (gdb) down #0 0x000000080126f364 in __vfprintf (fp=0x7fffde5f08a0, locale=0x80151b3e8, fmt0=0x8012e4d30 "%02d", ap=0x7fffde5f0ac8) at /usr/src/lib/libc/stdio/vfprintf.c:471 471 va_copy(orgap, ap); (gdb) down Bottom (i.e., innermost) frame selected; you cannot go down.

FreeBSD 11.1 and 11.2 RELEASE are effected.

On a personal note I would love to get this running so I can run VMs in GNS3 2.0.3!

Bug also posted to FreeBSD bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222047

openssservices avatar Sep 04 '17 11:09 openssservices

Possible solution is to compile the 32-bit version of Dynamips: https://github.com/GNS3/dynamips/issues/83#issuecomment-363770174

grossmj avatar Jul 10 '18 13:07 grossmj

The backtrace points to strftime, so this is probably fixed by #229

flaviojs avatar Apr 05 '24 15:04 flaviojs