D29810: Don't use the setenv function after fork

2020-06-07 Thread Jiří Paleček
jpalecek added a comment. In D29810#674815 , @dfaure wrote: > This breaks FreeBSD compilation. Please check: https://build.kde.org/job/Frameworks/job/kcrash/job/kf5-qt5%20FreeBSDQt5.14/17/ I see. It needs the declaration of `environ`,

D29814: Fix segfault on no restart args

2020-06-06 Thread Jiří Paleček
jpalecek added a comment. In D29814#674730 , @dfaure wrote: > This question is still without an answer: "Can you explain how to trigger this crash in the first place? Which application triggers it?" That's because I don't know in which

D29809: Don't invoke qstring localized stuff in critical section

2020-06-06 Thread Jiří Paleček
jpalecek added a comment. In D29809#674721 , @dfaure wrote: > The changes you mention don't appear in phabricator. > > I suggest amending your commit locally (so there's only one) and then > > arc diff HEAD~ Just to clarify. I

D29814: Fix segfault on no restart args

2020-06-06 Thread Jiří Paleček
jpalecek updated this revision to Diff 83232. jpalecek added a comment. Remove contamination from another patch made by the last upload REPOSITORY R285 KCrash CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29814?vs=83214=83232 BRANCH for-upstream REVISION DETAIL

D29809: Don't invoke qstring localized stuff in critical section

2020-06-06 Thread Jiří Paleček
jpalecek updated this revision to Diff 83231. jpalecek added a comment. Really commit the last changes REPOSITORY R285 KCrash CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29809?vs=83213=83231 BRANCH for-upstream REVISION DETAIL https://phabricator.kde.org/D29809 AFFECTED

D29814: Fix segfault on no restart args

2020-06-04 Thread Jiří Paleček
jpalecek updated this revision to Diff 83214. jpalecek added a comment. Polished the style as requested REPOSITORY R285 KCrash CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29814?vs=83138=83214 BRANCH for-upstream REVISION DETAIL https://phabricator.kde.org/D29814

D29809: Don't invoke qstring localized stuff in critical section

2020-06-04 Thread Jiří Paleček
jpalecek updated this revision to Diff 83213. jpalecek added a comment. Renamed the socketpath variable to s_socketpath, and make it static as requested REPOSITORY R285 KCrash CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29809?vs=83136=83213 BRANCH for-upstream REVISION

D29814: Fix segfault on no restart args

2020-05-27 Thread Jiří Paleček
jpalecek added a comment. In D29814#674013 , @dfaure wrote: > I'm a bit confused by the bug this is fixing. Surely this doesn't happen to all cases of crashes without autorestart enabled?? > > Also, it sounds like a null check might be

D29814: Fix segfault on no restart args

2020-05-26 Thread Jiří Paleček
jpalecek added a reviewer: dfaure. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29814 To: jpalecek, #frameworks, dfaure Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29810: Don't use the setenv function after fork

2020-05-26 Thread Jiří Paleček
jpalecek added a reviewer: dfaure. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29810 To: jpalecek, #frameworks, dfaure Cc: bruns, apol, anthonyfieroni, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham

D29809: Don't invoke qstring localized stuff in critical section

2020-05-26 Thread Jiří Paleček
jpalecek added a reviewer: dfaure. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29809 To: jpalecek, #frameworks, dfaure Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29810: Don't use the setenv function after fork

2020-05-26 Thread Jiří Paleček
jpalecek added inline comments. INLINE COMMENTS > bruns wrote in kcrash.cpp:698 > `std::copy_if`, instead of a separate `remove_if` pass. Thanks for that suggestion, updated accordingly. I admit I'm still more accustomed to the old ways of `remove_if`. REPOSITORY R285 KCrash REVISION

D29810: Don't use the setenv function after fork

2020-05-26 Thread Jiří Paleček
jpalecek updated this revision to Diff 83160. jpalecek marked an inline comment as done. jpalecek added a comment. Change remove_if and copy to copy_if, per suggestion REPOSITORY R285 KCrash CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29810?vs=83137=83160 BRANCH

D29810: Don't use the setenv function after fork

2020-05-23 Thread Jiří Paleček
jpalecek marked an inline comment as done. jpalecek added inline comments. INLINE COMMENTS > apol wrote in kcrash.cpp:823 > Use {} instead of ; for readability. Done that. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29810 To: jpalecek, #frameworks Cc: apol,

D29811: t/simplify-sending-data-through-socket

2020-05-23 Thread Jiří Paleček
jpalecek abandoned this revision. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29811 To: jpalecek, #frameworks Cc: anthonyfieroni, davidedmundson, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29813: t/minimize-allocations-in-crash-handler

2020-05-23 Thread Jiří Paleček
jpalecek abandoned this revision. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29813 To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29812: t/handle-errors-from-socket

2020-05-23 Thread Jiří Paleček
jpalecek abandoned this revision. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29812 To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29814: Fix segfault on no restart args

2020-05-23 Thread Jiří Paleček
jpalecek updated this revision to Diff 83138. jpalecek edited the summary of this revision. jpalecek added a dependency: D29810: Don't use the setenv function after fork. jpalecek added a comment. Edited the commit msg, also prune the dependencies I want to abandon REPOSITORY R285 KCrash

D29810: Don't use the setenv function after fork

2020-05-23 Thread Jiří Paleček
jpalecek added a dependent revision: D29814: Fix segfault on no restart args. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29810 To: jpalecek, #frameworks Cc: apol, anthonyfieroni, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29810: Don't use the setenv function after fork

2020-05-23 Thread Jiří Paleček
jpalecek updated this revision to Diff 83137. jpalecek retitled this revision from "Don't use setenv after fork" to "Don't use the setenv function after fork". jpalecek edited the summary of this revision. jpalecek added a comment. Change the code a bit for readability REPOSITORY R285

D29809: Don't invoke qstring localized stuff in critical section

2020-05-23 Thread Jiří Paleček
jpalecek updated this revision to Diff 83136. jpalecek retitled this revision from "Don't invoke QString localized stuff in critical section" to "Don't invoke qstring localized stuff in critical section". jpalecek edited the summary of this revision. jpalecek added a comment. (edited the

D29810: Don't use setenv after fork

2020-05-17 Thread Jiří Paleček
jpalecek added inline comments. INLINE COMMENTS > anthonyfieroni wrote in kcrash.cpp:825 > Just use vector, get the size by `environ_end - environ` No, that would be dynamic allocation, which is not safe in signal handlers. The whole purpose was to avoid it. REPOSITORY R285 KCrash REVISION

D29809: Don't invoke QString localized stuff in critical section

2020-05-17 Thread Jiří Paleček
jpalecek retitled this revision from "t/dont-invoke-qstring-localized-stuff-in-critical-section" to "Don't invoke QString localized stuff in critical section". jpalecek edited the summary of this revision. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29809 To:

D29810: Don't use setenv after fork

2020-05-17 Thread Jiří Paleček
jpalecek retitled this revision from "t/dont-use-setenv-after-fork" to "Don't use setenv after fork". jpalecek edited the summary of this revision. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29810 To: jpalecek, #frameworks Cc: kde-frameworks-devel, LeGast00n,

D29811: t/simplify-sending-data-through-socket

2020-05-17 Thread Jiří Paleček
jpalecek added a comment. In D29811#672534 , @davidedmundson wrote: > Your base kcrash is quite out of date - I simplified this method considerably a month ago, which gets rid of the two paths. It is 5.69. Yeah, now I can see you got

D29811: t/simplify-sending-data-through-socket

2020-05-17 Thread Jiří Paleček
jpalecek edited the summary of this revision. jpalecek added a reviewer: Frameworks. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29811 To: jpalecek, #frameworks Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29814: Fix segfault on no restart args

2020-05-17 Thread Jiří Paleček
jpalecek added a reviewer: Frameworks. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29814 To: jpalecek, #frameworks Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29810: t/dont-use-setenv-after-fork

2020-05-17 Thread Jiří Paleček
jpalecek edited the summary of this revision. jpalecek added a reviewer: Frameworks. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29810 To: jpalecek, #frameworks Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29809: t/dont-invoke-qstring-localized-stuff-in-critical-section

2020-05-17 Thread Jiří Paleček
jpalecek added a reviewer: Frameworks. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29809 To: jpalecek, #frameworks Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29814: Fix segfault on no restart args

2020-05-17 Thread Jiří Paleček
s_autoRestartCommandLine is null (when it wants to print the command line to stdout). This patch fixes that by making sure s_autoRestartCommandLine is always non-null. Depends on D29813 <https://phabricator.kde.org/D29813> Signed-off-by: Jiří Paleček REPOSITORY R285 KCrash

D29809: t/dont-invoke-qstring-localized-stuff-in-critical-section

2020-05-17 Thread Jiří Paleček
mutexes Signed-off-by: Jiří Paleček REPOSITORY R285 KCrash BRANCH for-upstream REVISION DETAIL https://phabricator.kde.org/D29809 AFFECTED FILES src/kcrash.cpp To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29811: t/simplify-sending-data-through-socket

2020-05-17 Thread Jiří Paleček
jpalecek added a dependent revision: D29812: t/handle-errors-from-socket. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29811 To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29813: t/minimize-allocations-in-crash-handler

2020-05-17 Thread Jiří Paleček
jpalecek added a dependent revision: D29814: Fix segfault on no restart args. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29813 To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29809: t/dont-invoke-qstring-localized-stuff-in-critical-section

2020-05-17 Thread Jiří Paleček
jpalecek added a dependent revision: D29810: t/dont-use-setenv-after-fork. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29809 To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29812: t/handle-errors-from-socket

2020-05-17 Thread Jiří Paleček
jpalecek added a dependent revision: D29813: t/minimize-allocations-in-crash-handler. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29812 To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29811: t/simplify-sending-data-through-socket

2020-05-17 Thread Jiří Paleček
tps://phabricator.kde.org/D29810> Signed-off-by: Jiří Paleček REPOSITORY R285 KCrash BRANCH for-upstream REVISION DETAIL https://phabricator.kde.org/D29811 AFFECTED FILES src/kcrash.cpp To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29810: t/dont-use-setenv-after-fork

2020-05-17 Thread Jiří Paleček
ed-off-by: Jiří Paleček REPOSITORY R285 KCrash BRANCH for-upstream REVISION DETAIL https://phabricator.kde.org/D29810 AFFECTED FILES src/kcrash.cpp To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29813: t/minimize-allocations-in-crash-handler

2020-05-17 Thread Jiří Paleček
tps://phabricator.kde.org/D29812> Signed-off-by: Jiří Paleček REPOSITORY R285 KCrash BRANCH for-upstream REVISION DETAIL https://phabricator.kde.org/D29813 AFFECTED FILES src/kcrash.cpp To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29810: t/dont-use-setenv-after-fork

2020-05-17 Thread Jiří Paleček
jpalecek added a dependent revision: D29811: t/simplify-sending-data-through-socket. REPOSITORY R285 KCrash REVISION DETAIL https://phabricator.kde.org/D29810 To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29812: t/handle-errors-from-socket

2020-05-17 Thread Jiří Paleček
org/D29811> Signed-off-by: Jiří Paleček REPOSITORY R285 KCrash BRANCH for-upstream REVISION DETAIL https://phabricator.kde.org/D29812 AFFECTED FILES src/kcrash.cpp To: jpalecek Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D19514: Add support for detecting avahi crash - cleanup invalid dbus objects in that case

2019-03-04 Thread Jiří Paleček
jpalecek edited the summary of this revision. REPOSITORY R272 KDNSSD REVISION DETAIL https://phabricator.kde.org/D19514 To: jpalecek, sitter Cc: kde-frameworks-devel, michaelh, ngraham, bruns

D19514: Add support for detecting avahi crash - cleanup invalid dbus objects in that case

2019-03-04 Thread Jiří Paleček
jpalecek added inline comments. INLINE COMMENTS > avahi-publicservice_p.h:42 > PublicServicePrivate(PublicService *parent, const QString , const > QString , const QString , unsigned int port) : > -QObject(), ServiceBasePrivate(name, type, domain, QString(), port), >

D19514: Add support for detecting avahi crash - cleanup invalid dbus objects in that case

2019-03-04 Thread Jiří Paleček
jpalecek edited the test plan for this revision. REPOSITORY R272 KDNSSD REVISION DETAIL https://phabricator.kde.org/D19514 To: jpalecek, sitter Cc: kde-frameworks-devel, michaelh, ngraham, bruns

D19514: Add support for detecting avahi crash - cleanup invalid dbus objects in that case

2019-03-04 Thread Jiří Paleček
jpalecek edited the summary of this revision. jpalecek edited the test plan for this revision. REPOSITORY R272 KDNSSD REVISION DETAIL https://phabricator.kde.org/D19514 To: jpalecek Cc: kde-frameworks-devel, michaelh, ngraham, bruns

D19514: Add support for detecting avahi crash - cleanup invalid dbus objects in that case

2019-03-04 Thread Jiří Paleček
jpalecek created this revision. Herald added a project: Frameworks. jpalecek requested review of this revision. REVISION SUMMARY This is a first take at tackling a problem caused by avahi going out of service -- usually its restart during an upgrade. In the current state, these things happen: