-
Notifications
You must be signed in to change notification settings - Fork 123
augeas plugin might crash #3120
Comments
Could you please give me a reproducible example on how to trigger this error? |
The error obviously only occurs if fopen fails. It could be reproduced by using LD_PRELOAD (e.g. see https://stackoverflow.com/questions/35771395/why-doesnt-ld-preload-trick-catch-open-when-called-by-fopen) with a shared library that fails on the Nth call of fopen. If you really want to do that, I can help you how to do it. It might also help to find other segfaults or unhelpful error messages. Otherwise, as already written above, I think code review is the more efficient approach to find these problems. |
Any progress here? I got the same segfault again.
|
I will add it higher in my priority |
Any progress here? It is only about adding a few return statements and such crashes are really severe. |
I will Look at it in sunday/monday morning... |
Thank you. The faster the better as this (and #3197) are release blockers and lcdproc is waiting for a release. |
I fear that you need to help me because I cannot reproduce this error. Do you have a mounted yml file which has some problems in it or why exactly is the augeas plugin called? |
Please look at the code. It is easy to see in the code what was done wrongly but such error is difficult to reproduce in all its forms. Without looking at the code, we can never get Elektra as stable as it was before introducing the new errors. Plenty of regressions were introduced in #2686, this cannot be fixed without understanding the code. |
I did it more than once ... The whole stacktrace tells me that when I try to close the file descriptor, there is a double "free()" call (free(): double free detected in tcache 2). Though I absolutely cannot relate this to anything I have changed.
No it is absolutely not for me because this is related to errors in memory management. Also your sentence is partly insulting as you assume I am too dumb to find the problem because it is "easy"...
Yes but not memory management or this kind of file opening/closing mechanism and as far as I understand this error it is related to this |
This is your interpretation. "easy" was about that the code changes should not change any semantics, so it is enough to check if semantics were changed. What I said (and still say) is that you should look at the code without any assumptions of free/malloc/memory. So forget everything about the stacktrace. Only look at 339d34d and about where |
Ok thank you, this was the information I was missing. I was on the wrong path before. |
Was this the only occurrence of a macro that had a return in the whole error changes? |
Btw, augeas was the only case which I remember that had this sort of macro replacement. I replaced all three occurrences. I will take an extra look this evening in the old revision to check for that |
Thank you! |
I have looked through the error settings in v0.8.26 and as far as I can tell it did not occur somewhere else than in the augeas section. So I think after we merge the PR this can be closed |
Thank you for looking! So mounting and augeas were the only regressions. |
I think we may close this issue |
Looks good, it does not crash anymore, instead I get: Sorry, module augeas issued the error C01200: |
Actually this is another known bug: the name of the lens should be printed. #203 |
When doing
kdb ls
I got a crash in Augeas:The problem was quite obviously introduced by 339d34d which does not return correctly in the error cases anymore.
A code review is needed if other places with
return
in macros are affected.The text was updated successfully, but these errors were encountered: