IBM / core-dump-handler

Save core dumps from a Kubernetes Service or RedHat OpenShift to an S3 protocol compatible object store
https://ibm.github.io/core-dump-handler/
MIT License
131 stars 40 forks source link

Duplicate file names in generated zip files #144

Open davisp opened 1 year ago

davisp commented 1 year ago

I've just started using core-dump-handler and have noticed zip files being generated with duplicate file names. I'm no Kubernetes expert so I can't decide if this is core-dump-handler or my kube config.

Archive:  b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
      427  05-09-2023 15:06   b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>-dump-info.json
3164946432  05-09-2023 15:06   b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>.core
      874  05-09-2023 15:06   b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>-pod-info.json
     1043  05-09-2023 15:06   b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>-runtime-info.json
     2128  05-09-2023 15:06   b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>-ps-info.json
   318124  05-09-2023 15:06   b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>-0.log
      371  05-09-2023 15:06   b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>-0-image-info.json
        0  05-09-2023 15:06   b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>-0.log
      254  05-09-2023 15:06   b7dc0443-feb4-4662-80b2-18009a272281-dump-1683644775-<redacted>-0-image-info.json
---------                     -------
3165269653                     9 files

There are two containers in the pod so having two log files is obviously expected, although I'd expect one of the two to end with -1.log instead of two both ending in -0.log. Do you reckon that's an obvious configuration bug on my end or something with core-dump-handler?

No9 commented 1 year ago

Very strange alright This is the line of code that gets the counter and container https://github.com/IBM/core-dump-handler/blob/main/core-dump-composer/src/main.rs#L292 It's a rust language feature so there must be another reason why the value is getting squashed. I'll build out the tests and see if I can recreate.