Opened 9 years ago

Closed 9 years ago

#3313 closed defect (fixed)

Library coverage hangs

Reported by: adrpo Owned by: sjoelund.se
Priority: high Milestone: 1.9.3
Component: Run-time Version: trunk
Keywords: Cc:

Description

It seems that the coverage for some libraries hangs and the processes need to be killed manually.

Attached is the trace i got from one of the hanging processes on test.openmodelica.org by attaching to it with gdb. Maybe we can find out what the problem is.

Attachments (1)

gdb.txt (35.3 KB) - added by adrpo 9 years ago.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by adrpo

comment:1 Changed 9 years ago by adrpo

Seems to hang in SimulationResultsCmp_compareResults after getData() is called.
The gdb trace was obtained running:

(gdb) set logging on
(gdb) thread apply all bt full
(gdb) bt full

comment:2 Changed 9 years ago by adrpo

This is the only change I see for SimulationResultsCmp_omc.c:
https://github.com/OpenModelica/OMCompiler/commit/baef0588e890ef007cfb28322f564593fa43b30b
Could it be that we don't allocate enough for the str?

comment:3 Changed 9 years ago by adrpo

Doesn't seem that malloc size is the issue. As far as I can see getData calls malloc which fails and then a signal handler is called #15 <signal handler called> which somehow hangs.

comment:4 Changed 9 years ago by adrpo

  • Owner set to sjoelund.se
  • Status changed from new to assigned

As far as I can tell the problem is with read_matlab4.c function dymolaStyleVariableName

That function is called with a name already in dymola format from the SimulationResultsCmp_compareResults via getData().
So you get a string like:

world.y_label.lines[2, 2, 1]

and you get back a string like:

world.y_label.lines[2,  ,,  1]

and also the size of i is wrong which makes the free(dymolaName) go bad.

comment:5 Changed 9 years ago by sjoelund.se

Which result-file did you run this on? I tried running one of the examples that hang on the testing script, but it works just fine on my machine in valgrind, gdb, and just running it in the shell.
I think I should just change it to not move commas instead, and rather do a white-space insensitive sorting.

comment:6 Changed 9 years ago by adrpo

Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulumInitTip.mos from MSL 3.2.1 for example.

comment:7 Changed 9 years ago by sjoelund.se

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.