Giter VIP home page Giter VIP logo

Comments (7)

winbatch avatar winbatch commented on May 8, 2024 1

This was 8 years ago so no, I no longer have the command ;)

from librdkafka.

edenhill avatar edenhill commented on May 8, 2024

Hi,

no, I havent seen this one before.

Some questions:

  • Does it happen on each execution of your program?
  • Does it rely on a certain number or set of brokers?
  • Is it reproducible with the rdkafka_example program?
  • Are you linking your program statically? I found this: https://sourceware.org/bugzilla/show_bug.cgi?id=10652

from librdkafka.

winbatch avatar winbatch commented on May 8, 2024

Hi Magnus,

To answer your questions:
Yes - happens every time
No - doesn't matter the number
No - doesn't happen on the example program, or even my own sample program
Yes - I think this is almost certainly the problem. I have a binary
which does a dlopen on a shared library that I wrote. That shared library
is statically linked to librdkafka.a. Based on the link you sent, I
wasn't sure if a final solution was found? From your reading, does it
mean I have to change how you build librdkafka.a to link in pthread?

On Fri, Dec 27, 2013 at 2:35 AM, Magnus Edenhill
[email protected]:

Hi,

no, I havent seen this one before.

Some questions:

  • Does it happen on each execution of your program?
  • Does it rely on a certain number or set of brokers?
  • Is it reproducible with the rdkafka_example program?
  • Are you linking your program statically? I found this:
    https://sourceware.org/bugzilla/show_bug.cgi?id=10652


Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-31250326
.

from librdkafka.

edenhill avatar edenhill commented on May 8, 2024

From what I understand you may link your program statically with librdkafka, but you need to link it dynamically with pthreads.
Can you try that?

from librdkafka.

winbatch avatar winbatch commented on May 8, 2024

Success! (Although it feels weird to make my single threaded binary link
with pthread just 'in case' one of the .so's I dlopen happens to use
threads, but I think I can deal with that :) )

On Fri, Dec 27, 2013 at 6:14 AM, Magnus Edenhill
[email protected]:

From what I understand you may link your program statically with
librdkafka, but you need to link it dynamically with pthreads.
Can you try that?


Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-31256767
.

from librdkafka.

edenhill avatar edenhill commented on May 8, 2024

Thing is that librdkafka is threaded (one thread per rd_kafka_t + one thread for each broker), and each broker thread will try to resolve its broker address using getaddrinfo(), and thats where it fails :)

from librdkafka.

fongjeng-kum avatar fongjeng-kum commented on May 8, 2024

Success! (Although it feels weird to make my single threaded binary link with pthread just 'in case' one of the .so's I dlopen happens to use threads, but I think I can deal with that :) )

On Fri, Dec 27, 2013 at 6:14 AM, Magnus Edenhill [email protected]:

From what I understand you may link your program statically with
librdkafka, but you need to link it dynamically with pthreads.
Can you try that?

Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-31256767
.

Hi, can I know the command to statically link the librdkafka that you have success on?

Thanks.

from librdkafka.

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.