xant / libhl

Simple and fast C library implementing a thread-safe API to manage hash-tables, linked lists, lock-free ring buffers and queues
GNU Lesser General Public License v3.0
420 stars 117 forks source link

Queue issue #29

Closed Pccccccc closed 2 years ago

Pccccccc commented 3 years ago

hi, author. I use create 5 thread to pop queue's arg, there are 10000 args that push to queue. But sometimes, the process will be crash. And from the crash log, i see that queue will call refcnt free and then process crash.

xant commented 3 years ago

Can you please provide the code hitting the issue? Also a stack trace could be helpful

xant commented 2 years ago

I'm not able to reproduce, please reopen this issue if you can reproduce and providing some example code.

xant commented 2 years ago

also, the scenario you describe is actually being tested (check the unit tests distributed with the repo)

  6 Threaded queue (5 pull-workers, 10000 items pushed to the queue from the main thread)                ok

It succeeds consistently for me ... so if you should probably check your code first (or let me see it)