简体   繁体   中英

Frequent kubernetes container restart

We are facing frequent Kubernetes container restarts in our production env and the container aborts by listing down below messages. In Kubernetes events, I also see a Backoff event. Please find below the error msg log.

#
#
 1: 0xaef6f1  [node]
 3: 0xf5b8b9 v8::internal::GlobalBackingStoreRegistry::Register(std::shared_ptr<v8::internal::BackingStore>) [node]
 6: 0x7f268814b0ef  [/app/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
# Check failed: result.second.
#
10: 0xcd8cbb  [node]
 1: 0xaef6f1  [node]
 6: 0x7fecce5ef0ef  [/app/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
13: 0x14fa219  [node]
 7: 0x7fecce5f15bb  [/app/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]

 

 8: 0x7fecce5f7ceb Napi::details::CallbackData<void (*)(Napi::CallbackInfo const&), void>::Wrapper(napi_env__*, 
12: 0xcda8e6 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]

 

#FailureMessage Object: 0x7ffce56dd1e0
#
 5: 0xa36020 napi_get_typedarray_info [node]
 2: 0x1af81e4 V8_Fatal(char const*, ...) [node]
 3: 0xf5b8b9 v8::internal::GlobalBackingStoreRegistry::Register(std::shared_ptr<v8::internal::BackingStore>) [node]
#
Aborted (core dumped)
#FailureMessage Object: 0x7ffdae60ed30
11: 0xcda26c  [node]

 

 4: 0xc99a98 v8::ArrayBuffer::GetBackingStore() [node]

 

#
 9: 0xa2d08f  [node]
# Check failed: result.second.
10: 0xcd8cbb  [node]
 5: 0xa36020 napi_get_typedarray_info [node]
 2: 0x1af81e4 V8_Fatal(char const*, ...) [node]
13: 0x14fa219  [node]
 7: 0x7f268814d5bb  [/app/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
# Fatal error in , line 0
 4: 0xc99a98 v8::ArrayBuffer::GetBackingStore() [node]
#
12: 0xcda8e6 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
#
Aborted (core dumped)
# Fatal error in , line 0
8: 0x7f2688153ceb Napi::details::CallbackData<void (*)(Napi::CallbackInfo const&), void>::Wrapper(napi_env__*, napi_callback_info__*) [/app/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
 9: 0xa2d08f  [node]
11: 0xcda26c  [node]

I tried searching on the internet but was not able to find anything, some pointers would be really helpful here.

Without more context this problem is hard to diagnose, but on a high level the answer is quite straight forward: You have a nodejs based application that uses the ref-napi library for memory/buffer management. https://www.npmjs.com/package/ref-napi Either you or a dependency is causing a problem related to native memory which lead to a crash of the node process.

Kubernetes notices that the container crashes and restarts it, to keep the pod available. Kubernetes is not to blame here, the application has a problem/bug and crashes. If this is fixed, the container restarts will stop.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM