Bug 209659 - emulators/dynagen crashes on start
Summary: emulators/dynagen crashes on start
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Tobias C. Berner
Depends on:
Reported: 2016-05-20 09:24 UTC by Victor Sudakov
Modified: 2020-03-08 17:52 UTC (History)
4 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.
Comment 8 Tobias C. Berner freebsd_committer 2019-11-09 19:05:50 UTC
Is this still relevant?
Comment 9 Victor Sudakov 2019-11-11 12:30:46 UTC
(In reply to Tobias C. Berner from comment #8)
> Is this still relevant?

Can you please wait 4-5 days for an answer?
Comment 10 Gleb Popov freebsd_committer 2019-11-26 06:56:53 UTC
Any news?
Comment 11 Victor Sudakov 2019-11-26 08:14:41 UTC
(In reply to Gleb Popov from comment #10)
Nothing has changed, still crashes.
Comment 12 Tobias C. Berner freebsd_committer 2020-03-08 17:31:49 UTC
Moin moin 

Could you regenerate the patch to apply to the current tree?

mfg Tobias
Comment 13 Victor Sudakov 2020-03-08 17:39:23 UTC
I've changed my job so this issue is not relevant to me any more. I think we can delete this port as useless.
Comment 14 Tobias C. Berner freebsd_committer 2020-03-08 17:46:35 UTC
Ok, I'll close it. Sorry for the long time it took for nothing to happen here.
Comment 15 Victor Sudakov 2020-03-08 17:52:51 UTC
(In reply to Tobias C. Berner from comment #14)
I did not mean closing just the PR. I meant deleting the port or marking it as BROKEN.

> Sorry for the long time it took for nothing to happen here.

NP, I was not enthusiastic enough to help revive the port, either. We now have more advanced Cisco lab environments.