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

dyld: lazy symbol binding failed: Symbol not found: _clock_gettime #117

Closed
BenRomberg opened this issue Jul 13, 2017 · 6 comments
Closed
Labels
Milestone

Comments

@BenRomberg
Copy link

BenRomberg commented Jul 13, 2017

We're getting the following error from the binary when trying to add a record to a stream (via KinesisProducer.addUserRecord) using amazon-kinesis-producer 0.12.4 or 0.12.5:

15:53:06.730 [kpl-daemon-0003] WARN  c.a.s.k.p.LogInputStreamReader - dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
15:53:06.730 [kpl-daemon-0003] WARN  c.a.s.k.p.LogInputStreamReader -   Referenced from: /tmp/bfce9c0d-2028-4815-bc6e-7aeb63582f0b/amazon-kinesis-producer-native-binaries/kinesis_producer_db53b066fadea1904ec9eea479f386f5868a9fda (which was built for Mac OS X 10.12)
15:53:06.730 [kpl-daemon-0003] WARN  c.a.s.k.p.LogInputStreamReader -   Expected in: /usr/lib/libSystem.B.dylib

This only happens on some systems:

  • It fails on MacOSX 10.11.5 and 10.11.6.
  • It works on MacOSX 10.12 and Ubuntu 16.10 with kernel 4.8.0

The producer subsequently fails with the following log messages. Due to the binding failure, it probably fails to read from the input channel, which leads to the updateCredentials task to be interrupted while the ExecutorService is being terminated:

13:31:58.131 [kpl-daemon-0007] WARN com.amazonaws.services.kinesis.producer.Daemon - Exception during updateCredentials
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method)
	at com.amazonaws.services.kinesis.producer.Daemon$5.run(Daemon.java:321)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
13:31:58.131 [kpl-daemon-0005] ERROR com.amazonaws.services.kinesis.producer.KinesisProducer - Error in child process
java.lang.RuntimeException: EOF reached during read
	at com.amazonaws.services.kinesis.producer.Daemon.fatalError(Daemon.java:521)
	at com.amazonaws.services.kinesis.producer.Daemon.fatalError(Daemon.java:497)
	at com.amazonaws.services.kinesis.producer.Daemon.fatalError(Daemon.java:493)
	at com.amazonaws.services.kinesis.producer.Daemon.readSome(Daemon.java:542)
	at com.amazonaws.services.kinesis.producer.Daemon.receiveMessage(Daemon.java:246)
	at com.amazonaws.services.kinesis.producer.Daemon.access$500(Daemon.java:63)
	at com.amazonaws.services.kinesis.producer.Daemon$3.run(Daemon.java:301)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Using version 0.12.3 we don't have this issue. Looking through the commits since 0.12.3, the issue was probably introduced with this commit (although I'm not a C++ expert): 766bac1

@pfifer any help would be greatly appreciated. Let me know if any more details are required. Thanks!

@BenRomberg
Copy link
Author

We resolved this ourselves by upgrading all build and developer machines to MacOS 10.12. It may make sense to document in the readme that this library needs at least MacOS 10.12 to run on a Mac.

@pfifer pfifer added this to the v0.12.6 milestone Nov 13, 2017
pfifer added a commit to pfifer/amazon-kinesis-producer that referenced this issue Nov 14, 2017
* Added Windows support
  The 0.12.x version now supports Windows.
  The Windows version is currently mastered on the branch `windows`, which will be merged at a later date.
  The build instructions for Windows are currently out of date, and will be updated at a later date.__
  * Issue awslabs#113
  * Issue awslabs#74
  * Issue awslabs#73
* Removed the libc wrapper
  The libc wrapper lowered the required version of glibc.  The KPL is now built with an older version of libc, which removes the need for the wrapper.
  * PR awslabs#139
* Set the minimum required version of macOS to 10.9.
  The KPL is now built against macOS 10.9.
  * Issue awslabs#117
  * PR awslabs#138

* Allow exceptions to bubble to the thread exception handler for Daemon threads.
  Exceptions that occur on daemon threads will now be allowed to propagate to the thread exception handler.  This doesn't provide any additional monitoring or handling of thread death.
  * PR awslabs#112
  * Issue awslabs#111
* Updated `amazon-kinesis-producer-sample` to use the correct properties in its configuration file.
  * PR awslabs#120
  * Issue awslabs#119
* Updated documentation of `AggregationMaxSize` to match actual Kinesis limits.
  * PR awslabs#133
* Added support for setting `ThreadingModel`, and `ThreadPoolSize` using a properties file.
  * PR awslabs#134
  * Issue awslabs#124
* Extracted `IKinesisProducer` from `KinesisProducer` to allow for easier testing.
  * PR awslabs#136
pfifer added a commit that referenced this issue Nov 14, 2017
* Added Windows support
  The 0.12.x version now supports Windows.
  The Windows version is currently mastered on the branch `windows`, which will be merged at a later date.
  The build instructions for Windows are currently out of date, and will be updated at a later date.__
  * Issue #113
  * Issue #74
  * Issue #73
* Removed the libc wrapper
  The libc wrapper lowered the required version of glibc.  The KPL is now built with an older version of libc, which removes the need for the wrapper.
  * PR #139
* Set the minimum required version of macOS to 10.9.
  The KPL is now built against macOS 10.9.
  * Issue #117
  * PR #138

* Allow exceptions to bubble to the thread exception handler for Daemon threads.
  Exceptions that occur on daemon threads will now be allowed to propagate to the thread exception handler.  This doesn't provide any additional monitoring or handling of thread death.
  * PR #112
  * Issue #111
* Updated `amazon-kinesis-producer-sample` to use the correct properties in its configuration file.
  * PR #120
  * Issue #119
* Updated documentation of `AggregationMaxSize` to match actual Kinesis limits.
  * PR #133
* Added support for setting `ThreadingModel`, and `ThreadPoolSize` using a properties file.
  * PR #134
  * Issue #124
* Extracted `IKinesisProducer` from `KinesisProducer` to allow for easier testing.
  * PR #136
@spectre683
Copy link

I am experiencing this issue on OS X 10.11.6 with the 0.12.6 release of the Amazon Kinesis Producer Library as well. I have tried releases 0.12.6, 0.12.5, 0.12.4, and 0.12.3 and 0.12.3 is the only release that does not have this issue. Releases 0.12.6, 0.12.5, and 0.12.4 all fail with the _clock_gettime symbol not being found (as described above).

@pfifer
Copy link
Contributor

pfifer commented Nov 15, 2017

This is related to a change with that Apple made that added clock_gettime. The headers don't honor the setting of macosx-version-min for the method. This causes Boost to pick it up, and use it. There is a fix in Boost to deal with it, but it requires a newer version of Boost. I'm looking at upgrading all the dependencies to current versions, which would fix this.

@pfifer pfifer reopened this Nov 20, 2017
@pfifer pfifer added the bug label Nov 21, 2017
@pfifer
Copy link
Contributor

pfifer commented Nov 21, 2017

This is fixed in #159, sorry for the delay.

I've verified that it on 10.11, and will be starting a release cycle soon

@pfifer pfifer modified the milestones: v0.12.6, v0.12.7 Nov 21, 2017
@spectre683
Copy link

I can confirm that the 0.12.7 release resolves this issue on OS X 10.11.6. Thank you for fixing this.

@pfifer
Copy link
Contributor

pfifer commented Dec 21, 2017

Closing this, thanks for reporting the issue.

@pfifer pfifer closed this as completed Dec 21, 2017
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

3 participants