Git Product home page Git Product logo

I access img by the url after Iuploaded img successfully,there is a error"magick/semaphore.c:346: LockSemaphoreInfo: Assertion `semaphore_info != (SemaphoreInfo *) ((void *)0)' failed." . I used ImageMagick-6.8.9-8 . about zimg HOT 3 CLOSED

buaazp avatar buaazp commented on July 24, 2024
I access img by the url after Iuploaded img successfully,there is a error"magick/semaphore.c:346: LockSemaphoreInfo: Assertion `semaphore_info != (SemaphoreInfo *) ((void *)0)' failed." . I used ImageMagick-6.8.9-8 .

from zimg.

Comments (3)

buaazp avatar buaazp commented on July 24, 2024

It is indeed a bug when imagemagick version is >= 6.8.9-8. Thanks for feedback.

I will explain the reson of this bug detailedly.

First, to use multi-thread features I added some trick codes in main.c:

    ExceptionInfo *exception=AcquireExceptionInfo();
    MagickInfo *jpeg_info = (MagickInfo *)GetMagickInfo("JPEG", exception);
    if(jpeg_info->thread_support != MagickTrue)
        LOG_PRINT(LOG_DEBUG, "thread_support != MagickTrue");
    jpeg_info->thread_support = MagickTrue;
    if(jpeg_info->thread_support != MagickTrue)
        LOG_PRINT(LOG_DEBUG, "thread_support != MagickTrue");
    MagickInfo *jpg_info = (MagickInfo *)GetMagickInfo("JPG", exception);
    jpg_info->thread_support = MagickTrue;

These codes make jpeg and jpg images use multi-thread features, but they are not legal. So when imagemagick release v6.8.9-8, these codes doesn't work and display magick/semaphore.c:346: LockSemaphoreInfo: failed error. The low versions have not this bug.

Now I have removed these codes and tested successfully. I'm trying to find other ways to improve performance of zimg. Just pull the latest code and have a try.

from zimg.

weiliangwei avatar weiliangwei commented on July 24, 2024

Thanks for replying to my question immediately. It makes me admire your professionalism . I used the low versions and it runs ok! I likes zimg . I am building a server which is about imgs . I have some questions When using zimg . The following are my questions :

  1. Our img server will store many imgs .The zimg has 3 mode .The 1st is store on local disk. So I use Memcached for caching imgs.I find zimg store imgs in Memcached automatically, Where could I set the Cache strategy?And how I make the memcached have enough memory?

  2. Local Disk and The other Storage methods(beansDb and SSD) ,which one has the best performance ?How could I make it as the enterprise image server I have no idears about Storage Imgs,Could you give me some suggestions ?

  3. I am a developer about Java in Beijing.I Like your Zimg. Could I make friends with you? Could you tell me your QQ or Email? My QQ :475641706 and Email: [email protected]

    Thanks again for your good job!

from zimg.

buaazp avatar buaazp commented on July 24, 2024

Q1. Cache control config is a little simple:

--cache config
--是否启用memcached缓存
cache           = 1
--缓存服务器IP
mc_ip           = '127.0.0.1'
--缓存服务器端口
mc_port         = 11211

Set memcached memory size when you start mc:

memcached -h
-m <num>      max memory to use for items in megabytes (default: 64 MB)

Q2. Local disk mode is fastest, but not reliable. I suggest you using beansdb.

Q3. My Email is public: [email protected].

from zimg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.