Bug 209659 - emulators/dynagen crashes on start
Summary: emulators/dynagen crashes on start
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs mailing list
Depends on:
Reported: 2016-05-20 09:24 UTC by Victor Sudakov
Modified: 2017-04-24 10:43 UTC (History)
2 users (show)

See Also:
pavelivolkov: maintainer-feedback+

Dynagen sample config (1.09 KB, text/plain)
2016-05-20 09:24 UTC, Victor Sudakov
no flags Details
patch (2.78 KB, patch)
2017-04-22 11:21 UTC, Pavel Volkov
pavelivolkov: maintainer-approval+
Details | Diff
portlint log (16.33 KB, text/plain)
2017-04-22 11:22 UTC, Pavel Volkov
no flags Details
build log (7.59 KB, text/plain)
2017-04-22 11:22 UTC, Pavel Volkov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Sudakov 2016-05-20 09:24:05 UTC
Created attachment 170503 [details]
Dynagen sample config

dynagen-0.11.0_4 crashes with:

udakov@wst10sudakovva:~/dynagen % dynagen mpls1.net 
Reading configuration file...

*** Dynagen has crashed ****
Please open a bug report against Dynagen at http://7200emu.hacki.at
Include a description of what you were doing when the error occured, your
network file, also any errors output by dynamips hypervisor, and the following traceback data:
Traceback (most recent call last):
  File "/usr/local/bin/dynagen", line 2207, in <module>
  File "/usr/local/bin/dynagen", line 1005, in import_config
    config = self.open_config(FILENAME)
  File "/usr/local/bin/dynagen", line 978, in open_config
    res = config.validate(vtor, preserve_errors=True)
UnboundLocalError: local variable 'config' referenced before assignment
Press ENTER to exit

The config should be correct, I use it on an older system. Howerer, I am attaching it just in case.
Comment 1 Pavel Volkov 2017-04-22 11:21:29 UTC
Created attachment 181998 [details]

This is a patch for correct problem.
Comment 2 Pavel Volkov 2017-04-22 11:22:09 UTC
Created attachment 181999 [details]
portlint log
Comment 3 Pavel Volkov 2017-04-22 11:22:35 UTC
Created attachment 182000 [details]
build log
Comment 4 Victor Sudakov 2017-04-24 03:03:25 UTC
(In reply to Pavel Volkov from comment #1)
This patch fixes the immediate problem of dynagen crashing with a python error. Thank you for that.

Now the "dynamips -H 7200" process itself crashes with a bus error (FreeBSD 10.3-RELEASE-p18 amd64).
Comment 5 Pavel Volkov 2017-04-24 08:22:29 UTC
(In reply to vas from comment #4)
Hello. Please, set "autostart" to false. And start your router's manually. Step by step.
Comment 6 Victor Sudakov 2017-04-24 08:47:41 UTC
(In reply to Pavel Volkov from comment #5)
Actually, my Step 0 was to test RAM with memtest86. It's OK.

My Step 1 was to simplify the lab (see below). Anyway, dynamips crashes with a bus error (signal 10) as soon as I access the virtual router's console at "telnet localhost 2001".

autostart = false
model = 7200
workingdir = /usr/home/student/dynagen/work


        image = /usr/home/student/dynagen/C7200-AD.BIN
        npe = npe-400
        ram = 190
        mmap = false

    [[ROUTER R1]]
        console = 2001
        model = 7200


Please note that I have removed all the autostart and idlepc stuff.
Comment 7 Pavel Volkov 2017-04-24 10:43:32 UTC
(In reply to vas from comment #6)
You right. It's dynamips problem, not dynagen. I don't know how to fix it yet.