Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdl-0.9.9 against latest graphicsmagick-1.3.32 #611

Closed
dirteat opened this issue Jul 9, 2019 · 23 comments
Closed

gdl-0.9.9 against latest graphicsmagick-1.3.32 #611

dirteat opened this issue Jul 9, 2019 · 23 comments
Labels

Comments

@dirteat
Copy link

dirteat commented Jul 9, 2019

Hello there,

this compiles fine, but crashes as soon as gdl starts:

gdl
gdl: magick/semaphore.c:601: LockSemaphoreInfo: Assertion `semaphore_info != (SemaphoreInfo *) NULL' failed.
Aborted (core dumped)

Any ideas on what's going on?
Thanks,
Cheers,
chris.

@alaingdl
Copy link
Contributor

alaingdl commented Jul 9, 2019

Could you please give more information on your configuration ?
I am ok on Debian with GM 1.3.30, u1404 & GM 1.3.18
and OSX 10.14.4 & GM 1.3.31

(osx, compiler flavor & version)

thanks

A.

@dirteat
Copy link
Author

dirteat commented Jul 9, 2019

Yes, sorry.
That's on Mageia 7, gcc version 8.3.1, GM version 1.3.32 (gdl worked fine with GM < 1.3.32), so I suspect that's the suspect here, especially in view of the error message. DuckingGo on the web suggests it is an issue with GM initialization, but I cannot tell if the bug is in GM or within GDL initialization of GM!?

@alaingdl
Copy link
Contributor

alaingdl commented Jul 9, 2019

thanks
I received in private yesterday the exactly same bug report than you but for OSX 10.14.5 with unknown GM version and was not able to reproduce up to now

A.

@michel-plugge
Copy link

I have the same issue on fedora and CentOS 6/7 with precompiled version of gdl. Using GraphicsMagick.x86_64 0:1.3.32-1.el7 / GraphicsMagick-c++-1.3.32-1.fc29.x86_64 fails, but after downgrading to GraphicsMagick-1.3.31-2.el7.x86_64.rpm / GraphicsMagick-c++-1.3.30-3.fc29.x86_64 gdl runs fine.

Michael

@darthoctopus
Copy link

I can confirm this on Archlinux — I get the error with graphicsmagick-1.3.32-1, which goes away when downgrading to graphicsmagick-1.3.31-3

@MQMLab
Copy link

MQMLab commented Aug 8, 2019

Similar, on OS 10.14.6. All seemed fine after sudo port install gnudatalanguage
After typing gdl, though:
Assertion failed: (semaphore_info != (SemaphoreInfo *) NULL), function LockSemaphoreInfo, file magick/semaphore.c, line 601.
Abort trap: 6

@griegner
Copy link

Same issue on OS 10.14.6:
Assertion failed: (semaphore_info != (SemaphoreInfo *) NULL), function LockSemaphoreInfo, file magick/semaphore.c, line 601.
Abort

@safusu
Copy link

safusu commented Aug 22, 2019

More info here, but you can fix this by editing gnudatalanguage-0.9.9/src/magick_cl.cpp by adding

__attribute__((constructor)) static void init(void) {
   START_MAGICK;
 }

after

unsigned int gCount = 0;
static bool notInitialized = true;

@slayoo
Copy link
Member

slayoo commented Aug 22, 2019

For the record, this fix is in the repo since May:
d4045d4#diff-fee07a0c71823f10358bdf47d478390d

... I guess it's time for a new release

@GillesDuvert
Copy link
Contributor

Just switched to Mageia 7.1 , found severe incompatibilities with graphicsmagic but also plplot/wxwidgets and libproj, all these libraries having evolved in the meantime. But no crash as reported here.

@dirteat
Copy link
Author

dirteat commented Sep 6, 2019

You meant mageia 6.1? You should be able to install it from the distro, it is named "gnudl".
Update pushed to mageia 7:

https://bugs.mageia.org/show_bug.cgi?id=25385

@maynardGK
Copy link
Contributor

On windows I see this problem with GM.
I just built an up-to-date gdl from git which has the above change to magick_cl.cpp. Prior version (30) can be substituted in and issue goes away.

$ gdlgit
Assertion failed!

Program: D:\bld\gdl\mingw32-git\src\gdl.exe
File: ../magick/semaphore.c, Line 601

Expression: semaphore_info != (SemaphoreInfo *) NULL

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

@GillesDuvert
Copy link
Contributor

Hi @dirteat ,
No actually it is Mageia 7.1 released last July. And it has the same initialisation failure.

It is possible that the line
__attribute__((constructor)) static void init(void) { START_MAGICK;}
has disappeared during a merge?

Now that this constructor is part of GDL, the call to START_MAGICK in the various functions of magick_cl are superfluous and should be dropped, I guess?

@markdconner
Copy link

Same issue on Amazon Linux 2 and gdl-0.9.9 with what appears to be GraphicsMagick 1.3. I did have GDL working on Amazon Linux 2 but a non-GDL update somewhere around June caused it to begin failing for me.

gdl: magick/semaphore.c:601: LockSemaphoreInfo: Assertion `semaphore_info != (SemaphoreInfo *) NULL' failed.
Aborted (core dumped)

@maynardGK
Copy link
Contributor

@markdconner Ugh! So if you just use a pre-compiled GDL then the easiest solution, if it is easy, is to downgrade the grahpicsmagick install to below 1.3.32 - just swapping the library out should do the trick.

@markdconner
Copy link

@maynardGK Amazon Linux is not making it easy, though. I tried the commands suggested below with no benefit. I do have epel enabled. Not sure if doing an uninstall of the current version and an install of 1.3.29-1.amzn2 will work if those supporting libraries are not available.

I'm a bit of a noob when it comes to managing software versions like this, I'm generally dependent on yum doing it's thing without a lot of hand-holding.

[~]$ sudo yum downgrade GraphicsMagick
Loaded plugins: amzn_workspaces_filter_updates, halt_os_update_check, priorities, update-motd
332 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package GraphicsMagick.x86_64 0:1.3.29-1.amzn2 will be a downgrade
---> Package GraphicsMagick.x86_64 0:1.3.32-2.amzn2 will be erased
--> Finished Dependency Resolution
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

@maynardGK
Copy link
Contributor

maynardGK commented Sep 13, 2019

On my windows' machine I see the same names for shareable images on versions 30 and 32: I was guessing that v29 would also be same-named and also that a similar situation would hold under linux, for the ".so" files found in /lib or in /lib64.
Otherwise I would presume that GDL would be included in the dependency for GM on your system.

If the downgrade fails to remedy the situation I would encourage you to load the compile/build tools and development packages to build it on your system.

For version 29, the /usr/lib links should look like (with different creation dates):

$ ls -lat /usr/lib | grep libGraphicsM
lrwxrwxrwx 1 root root      29 Sep 12 10:35 libGraphicsMagick++.so -> ibGraphicsMagick++.so.12.3.2
lrwxrwxrwx 1 root root      27 Sep 12 10:35 libGraphicsMagick.so -> libGraphicsMagick.so.3.18.0
lrwxrwxrwx 1 root root      29 Sep 12 10:35 libGraphicsMagick++.so.12 ->libGraphicsMagick++.so.12.3.2
lrwxrwxrwx 1 root root      27 Sep 12 10:35 libGraphicsMagick.so.3 -> libGraphicsMagick.so.3.18.0
lrwxrwxrwx 1 root root      30 Sep 12 10:35 libGraphicsMagickWand.so -> libGraphicsMagickWand.so.2.9.0
lrwxrwxrwx 1 root root      30 Sep 12 10:35 libGraphicsMagickWand.so.2 -> libGraphicsMagickWand.so.2.9.0

For v32, the version numbers are 12.4.1, 3.20.1, and 2.9.2

@GillesDuvert
Copy link
Contributor

the 'magic' stanza __attribute__((constructor)) static void init(void) { START_MAGICK;} is in the master code source, so this bug should have disappeared (and that makes a realease all the more needed)

@DanielO
Copy link

DanielO commented Nov 22, 2019

This helps at startup on FreeBSD 12 but it segfaults on exit.

#0  0x000000080414345a in thr_kill () at /lib/libc.so.7
#1  0x0000000804141844 in raise () at /lib/libc.so.7
#2  0x00000008040b40c6 in abort () at /lib/libc.so.7
#3  0x00000008018bacd7 in  () at /usr/local/lib/libGraphicsMagick.so.3
#4  0x00000008013254b6 in  () at /lib/libthr.so.3
#5  0x0000000801324a22 in  () at /lib/libthr.so.3
#6  0x00007ffffffff003 in <signal handler called> ()
#7  0x00000008018b93a7 in IsEventLogging () at /usr/local/lib/libGraphicsMagick.so.3
#8  0x00000008018b93e4 in LogMagickEventList () at /usr/local/lib/libGraphicsMagick.so.3
#9  0x00000008018b94b7 in LogMagickEvent () at /usr/local/lib/libGraphicsMagick.so.3
#10 0x00000008018c62f8 in DestroyCacheInfo () at /usr/local/lib/libGraphicsMagick.so.3
#11 0x00000008018c6498 in DestroyImagePixels () at /usr/local/lib/libGraphicsMagick.so.3
#12 0x00000008018a7919 in DestroyImage () at /usr/local/lib/libGraphicsMagick.so.3
#13 0x0000000801d3c2ec in Magick::ImageRef::~ImageRef() () at /usr/local/lib/libGraphicsMagick++.so.12
#14 0x0000000801d3247e in Magick::Image::~Image() () at /usr/local/lib/libGraphicsMagick++.so.12
#15 0x0000000000bdcd72 in  ()
#16 0x00000008041240c1 in __cxa_finalize () at /lib/libc.so.7
#17 0x00000008040b3cc1 in exit () at /lib/libc.so.7

@thierry-FreeBSD
Copy link
Member

This helps at startup on FreeBSD 12 but it segfaults on exit.

Thanks for the report!

I temporarily replaced GraphicsMagick by ImageMagick in the FreeBSD ports tree.

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Nov 23, 2019
gnudatalanguage/gdl#611

Meanwhile, switch to ImageMagick, even if GraphicsMagick is prefered.

Reported by:	Daniel O'Connor <darius (at) dons.net.au>


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@518263 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Nov 23, 2019
gnudatalanguage/gdl#611

Meanwhile, switch to ImageMagick, even if GraphicsMagick is prefered.

Reported by:	Daniel O'Connor <darius (at) dons.net.au>
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this issue Nov 24, 2019
gnudatalanguage/gdl#611

Meanwhile, switch to ImageMagick, even if GraphicsMagick is prefered.

Reported by:	Daniel O'Connor <darius (at) dons.net.au>


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@518263 35697150-7ecd-e111-bb59-0022644237b5
@slayoo
Copy link
Member

slayoo commented Jun 18, 2020

Closing as outdated (and fixed by d4045d4#diff-fee07a0c71823f10358bdf47d478390d), please report/reopen if the problem appears again

@slayoo slayoo closed this as completed Jun 18, 2020
@opoplawski
Copy link
Contributor

I'm starting to see this again in Fedora Rawhide:

test 210
        Start 210: test_zip.pro

210: Test command: /home/orion/fedora/gdl/gdl-4a9652035c4b11c12fcd5cf8b497f0f2cb07eee9/build/testsuite/launchtest "test_zip.pro"
210: Test timeout computed to be: 10000000
210: -quiet: magick/semaphore.c:601: LockSemaphoreInfo: Assertion `semaphore_info != (SemaphoreInfo *) NULL' failed.
210: TEST EXITED FROM SIGNAL 6
210/210 Test #210: test_zip.pro .......................***Failed    0.36 sec

@pjb7687
Copy link
Member

pjb7687 commented Jan 10, 2021

This should be solved now. Please reopen it when it happens again.

@pjb7687 pjb7687 closed this as completed Jan 10, 2021
svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this issue Jan 10, 2024
gnudatalanguage/gdl#611

Meanwhile, switch to ImageMagick, even if GraphicsMagick is prefered.

Reported by:	Daniel O'Connor <darius (at) dons.net.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests