imatix / gsl

iMatix GSL code generator
http://www.imatix.com
GNU General Public License v3.0
537 stars 107 forks source link

Problem: error with SMT when generating czmq build stuff #102

Open sappo opened 8 years ago

sappo commented 8 years ago

To following error is thrown:

Fatal error in application - aborted
Abort.  Compile with SMT_DETECT for more info.
Aborted (core dumped)

The error occurs the second time ./generate.sh is executed. To reproduce this error do the following:

git clone https://github.com/zeromq/czmq.git
cd czmq
./generate.sh    # Everything works fine
./generate.sh    # Fatal error (see below)
jschultz commented 8 years ago

I tracked the problem down to GSL's script management, and in particular its cleaning up of scripts to save memory. I don't have a real solution, but a work-around would be to modify generate.sh to add an argument '-s:999999999' to the GSL invocation, so that it doesn't try to clean up the script.

On 02/09/15 20:06, Kevin Sapper wrote:

To following error is thrown:

|Fatal error in application - aborted Abort. Compile with SMT_DETECT for more info. Aborted (core dumped) |

The error occurs the second time ./generate.sh is executed. To reproduce this error do the following:

|git clone https://github.com/zeromq/czmq.git cd czmq ./generate.sh # Everything works fine ./generate.sh # Fatal error (see below) |

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102.

sappo commented 8 years ago

@jschultz thanks for the workaround, with it the script runs through. Though there is still an problem. In case of czmq the error with or without workaround will omit the generation of the last 6 lines of a header file in czmq.

jschultz commented 8 years ago

I know plenty about GSL (I wrote most of it) but literally nothing about czmq. If you can demonstrate that the problem is caused by GSL itself (which the initial error most certainly was) then I'll take a look at it, but otherwise I'm handballing this issue to someone else.

On 04/09/15 17:12, Kevin Sapper wrote:

@jschultz https://github.com/jschultz thanks for the workaround, with it the script runs through. Though there is still an problem. In case of czmq the error with or without workaround will omit the generation of the last 6 lines of a header file in czmq.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137662818.

sappo commented 8 years ago

Could this problem be caused by repeated calls to 'output' without 'close'? Because this seems to solve the issue.

hintjens commented 8 years ago

I've seen this before with gsl, an abort that causes the last part of the script to not be output. Could be a file buffering issue. Czmq is irrelevant here, I'm pretty sure, except as a reproducible failure case. On 4 Sep 2015 13:35, "jschultz" notifications@github.com wrote:

I know plenty about GSL (I wrote most of it) but literally nothing about czmq. If you can demonstrate that the problem is caused by GSL itself (which the initial error most certainly was) then I'll take a look at it, but otherwise I'm handballing this issue to someone else.

On 04/09/15 17:12, Kevin Sapper wrote:

@jschultz https://github.com/jschultz thanks for the workaround, with it the script runs through. Though there is still an problem. In case of czmq the error with or without workaround will omit the generation of the last 6 lines of a header file in czmq.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137662818.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137714088.

jschultz commented 8 years ago

Can someone produce a minimal test case that demonstrates the problem and I'll take a look at it?

On 04/09/15 22:01, Pieter Hintjens wrote:

I've seen this before with gsl, an abort that causes the last part of the script to not be output. Could be a file buffering issue. Czmq is irrelevant here, I'm pretty sure, except as a reproducible failure case. On 4 Sep 2015 13:35, "jschultz" notifications@github.com wrote:

I know plenty about GSL (I wrote most of it) but literally nothing about czmq. If you can demonstrate that the problem is caused by GSL itself (which the initial error most certainly was) then I'll take a look at it, but otherwise I'm handballing this issue to someone else.

On 04/09/15 17:12, Kevin Sapper wrote:

@jschultz https://github.com/jschultz thanks for the workaround, with it the script runs through. Though there is still an problem. In case of czmq the error with or without workaround will omit the generation of the last 6 lines of a header file in czmq.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137662818.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137714088.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137717320.

sappo commented 8 years ago
git clone https://github.com/zeromq/czmq.git
cd czmq
./generate.sh    # Everything works fine
./generate.sh    # Fatal error (see below)

You can find the corrupted file with git status or git diff

jschultz commented 8 years ago

I remember something like this. Didn't we fix this problem? If not, how did czmq ever work?

On 04/09/15 22:01, Pieter Hintjens wrote:

I've seen this before with gsl, an abort that causes the last part of the script to not be output. Could be a file buffering issue. Czmq is irrelevant here, I'm pretty sure, except as a reproducible failure case. On 4 Sep 2015 13:35, "jschultz" notifications@github.com wrote:

I know plenty about GSL (I wrote most of it) but literally nothing about czmq. If you can demonstrate that the problem is caused by GSL itself (which the initial error most certainly was) then I'll take a look at it, but otherwise I'm handballing this issue to someone else.

On 04/09/15 17:12, Kevin Sapper wrote:

@jschultz https://github.com/jschultz thanks for the workaround, with it the script runs through. Though there is still an problem. In case of czmq the error with or without workaround will omit the generation of the last 6 lines of a header file in czmq.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137662818.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137714088.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137717320.

hintjens commented 8 years ago

So CZMQ is a C library, nothing special. There are a number of different code generators in there. The one that's failing here is one particular GSL script. I think there's an exception internally that's causing the output to be discarded.

On Sat, Sep 5, 2015 at 7:18 AM, jschultz notifications@github.com wrote:

I remember something like this. Didn't we fix this problem? If not, how did czmq ever work?

On 04/09/15 22:01, Pieter Hintjens wrote:

I've seen this before with gsl, an abort that causes the last part of the script to not be output. Could be a file buffering issue. Czmq is irrelevant here, I'm pretty sure, except as a reproducible failure case. On 4 Sep 2015 13:35, "jschultz" notifications@github.com wrote:

I know plenty about GSL (I wrote most of it) but literally nothing about czmq. If you can demonstrate that the problem is caused by GSL itself (which the initial error most certainly was) then I'll take a look at it, but otherwise I'm handballing this issue to someone else.

On 04/09/15 17:12, Kevin Sapper wrote:

@jschultz https://github.com/jschultz thanks for the workaround, with it the script runs through. Though there is still an problem. In case of czmq the error with or without workaround will omit the generation of the last 6 lines of a header file in czmq.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137662818.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137714088.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137717320.

— Reply to this email directly or view it on GitHub https://github.com/imatix/gsl/issues/102#issuecomment-137911772.