|
|
Descriptioncrash-reporter: fix race condition between cron crash_sender and test invoked
Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0
BUG=7765
TEST=CrashSender and UserCrash
Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=328a21d
Patch Set 1 #
Messages
Total messages: 8 (0 generated)
LGTM On Sun, Oct 17, 2010 at 2:55 PM, <kmixter@chromium.org> wrote: > Reviewers: sosa, > > Description: > fix bug > > Change-Id: Ia6edf08d7061399b7e717f475d11cac1ffc259ad > > crash-reporter: fix race condition between cron crash_sender and test > invoked > > Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0 > > BUG=7765 > TEST=CrashSender and UserCrash > > Please review this at http://codereview.chromium.org/3748011/show > > SVN Base: http://git.chromium.org/git/crash-reporter.git > > Affected files: > M crash_sender > > > Index: crash_sender > diff --git a/crash_sender b/crash_sender > index > c9eec0591f9d46fce8a1e9d1a1d2d6d517a859a0..244c31d2a19e0bcd1a66b0e337a4a614f49d14a3 > 100644 > --- a/crash_sender > +++ b/crash_sender > @@ -28,6 +28,9 @@ FORCE_OFFICIAL=${FORCE_OFFICIAL:-0} > # Path to hardware class description. > HWCLASS_PATH="/sys/devices/platform/chromeos_acpi/HWID" > > +# Ignore PAUSE_CRASH_SENDING file if set. > +OVERRIDE_PAUSE_SENDING=${OVERRIDE_PAUSE_SENDING:-0} > + > # Maximum crashes to send per day. > MAX_CRASH_RATE=${MAX_CRASH_RATE:-32} > > @@ -343,7 +346,8 @@ send_crashes() { > > main() { > trap cleanup EXIT INT TERM > - if [ -e "${PAUSE_CRASH_SENDING}" ]; then > + if [ -e "${PAUSE_CRASH_SENDING}" ] && \ > + [ ${OVERRIDE_PAUSE_SENDING} -eq 0 ]; then > lecho "Exiting early due to ${PAUSE_CRASH_SENDING}." > exit 1 > fi > > >
Can we get some better issue/subjects on these CL's? -Sam On Sun, Oct 17, 2010 at 7:23 PM, Chris Sosa <sosa@chromium.org> wrote: > LGTM > > On Sun, Oct 17, 2010 at 2:55 PM, <kmixter@chromium.org> wrote: > > Reviewers: sosa, > > > > Description: > > fix bug > > > > Change-Id: Ia6edf08d7061399b7e717f475d11cac1ffc259ad > > > > crash-reporter: fix race condition between cron crash_sender and test > > invoked > > > > Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0 > > > > BUG=7765 > > TEST=CrashSender and UserCrash > > > > Please review this at http://codereview.chromium.org/3748011/show > > > > SVN Base: http://git.chromium.org/git/crash-reporter.git > > > > Affected files: > > M crash_sender > > > > > > Index: crash_sender > > diff --git a/crash_sender b/crash_sender > > index > > > c9eec0591f9d46fce8a1e9d1a1d2d6d517a859a0..244c31d2a19e0bcd1a66b0e337a4a614f49d14a3 > > 100644 > > --- a/crash_sender > > +++ b/crash_sender > > @@ -28,6 +28,9 @@ FORCE_OFFICIAL=${FORCE_OFFICIAL:-0} > > # Path to hardware class description. > > HWCLASS_PATH="/sys/devices/platform/chromeos_acpi/HWID" > > > > +# Ignore PAUSE_CRASH_SENDING file if set. > > +OVERRIDE_PAUSE_SENDING=${OVERRIDE_PAUSE_SENDING:-0} > > + > > # Maximum crashes to send per day. > > MAX_CRASH_RATE=${MAX_CRASH_RATE:-32} > > > > @@ -343,7 +346,8 @@ send_crashes() { > > > > main() { > > trap cleanup EXIT INT TERM > > - if [ -e "${PAUSE_CRASH_SENDING}" ]; then > > + if [ -e "${PAUSE_CRASH_SENDING}" ] && \ > > + [ ${OVERRIDE_PAUSE_SENDING} -eq 0 ]; then > > lecho "Exiting early due to ${PAUSE_CRASH_SENDING}." > > exit 1 > > fi > > > > > > >
Agreed, please edit issue before committing on both these CL's so that git history shows what you want which is: "crash-reporter: fix race condition between cron crash_sender and test invoked" On Mon, Oct 18, 2010 at 9:41 AM, Sam Leffler <sleffler@chromium.org> wrote: > Can we get some better issue/subjects on these CL's? > -Sam > > On Sun, Oct 17, 2010 at 7:23 PM, Chris Sosa <sosa@chromium.org> wrote: >> >> LGTM >> >> On Sun, Oct 17, 2010 at 2:55 PM, <kmixter@chromium.org> wrote: >> > Reviewers: sosa, >> > >> > Description: >> > fix bug >> > >> > Change-Id: Ia6edf08d7061399b7e717f475d11cac1ffc259ad >> > >> > crash-reporter: fix race condition between cron crash_sender and test >> > invoked >> > >> > Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0 >> > >> > BUG=7765 >> > TEST=CrashSender and UserCrash >> > >> > Please review this at http://codereview.chromium.org/3748011/show >> > >> > SVN Base: http://git.chromium.org/git/crash-reporter.git >> > >> > Affected files: >> > M crash_sender >> > >> > >> > Index: crash_sender >> > diff --git a/crash_sender b/crash_sender >> > index >> > >> > c9eec0591f9d46fce8a1e9d1a1d2d6d517a859a0..244c31d2a19e0bcd1a66b0e337a4a614f49d14a3 >> > 100644 >> > --- a/crash_sender >> > +++ b/crash_sender >> > @@ -28,6 +28,9 @@ FORCE_OFFICIAL=${FORCE_OFFICIAL:-0} >> > # Path to hardware class description. >> > HWCLASS_PATH="/sys/devices/platform/chromeos_acpi/HWID" >> > >> > +# Ignore PAUSE_CRASH_SENDING file if set. >> > +OVERRIDE_PAUSE_SENDING=${OVERRIDE_PAUSE_SENDING:-0} >> > + >> > # Maximum crashes to send per day. >> > MAX_CRASH_RATE=${MAX_CRASH_RATE:-32} >> > >> > @@ -343,7 +346,8 @@ send_crashes() { >> > >> > main() { >> > trap cleanup EXIT INT TERM >> > - if [ -e "${PAUSE_CRASH_SENDING}" ]; then >> > + if [ -e "${PAUSE_CRASH_SENDING}" ] && \ >> > + [ ${OVERRIDE_PAUSE_SENDING} -eq 0 ]; then >> > lecho "Exiting early due to ${PAUSE_CRASH_SENDING}." >> > exit 1 >> > fi >> > >> > >> > > >
Heh - yeah. The email subject came from one of my last edits to the CL, not the first CL message. On Mon, Oct 18, 2010 at 9:57 AM, Chris Sosa <sosa@google.com> wrote: > Agreed, please edit issue before committing on both these CL's so that > git history shows what you want which is: "crash-reporter: fix race > condition between cron crash_sender and test invoked" > > On Mon, Oct 18, 2010 at 9:41 AM, Sam Leffler <sleffler@chromium.org> > wrote: > > Can we get some better issue/subjects on these CL's? > > -Sam > > > > On Sun, Oct 17, 2010 at 7:23 PM, Chris Sosa <sosa@chromium.org> wrote: > >> > >> LGTM > >> > >> On Sun, Oct 17, 2010 at 2:55 PM, <kmixter@chromium.org> wrote: > >> > Reviewers: sosa, > >> > > >> > Description: > >> > fix bug > >> > > >> > Change-Id: Ia6edf08d7061399b7e717f475d11cac1ffc259ad > >> > > >> > crash-reporter: fix race condition between cron crash_sender and test > >> > invoked > >> > > >> > Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0 > >> > > >> > BUG=7765 > >> > TEST=CrashSender and UserCrash > >> > > >> > Please review this at http://codereview.chromium.org/3748011/show > >> > > >> > SVN Base: http://git.chromium.org/git/crash-reporter.git > >> > > >> > Affected files: > >> > M crash_sender > >> > > >> > > >> > Index: crash_sender > >> > diff --git a/crash_sender b/crash_sender > >> > index > >> > > >> > > c9eec0591f9d46fce8a1e9d1a1d2d6d517a859a0..244c31d2a19e0bcd1a66b0e337a4a614f49d14a3 > >> > 100644 > >> > --- a/crash_sender > >> > +++ b/crash_sender > >> > @@ -28,6 +28,9 @@ FORCE_OFFICIAL=${FORCE_OFFICIAL:-0} > >> > # Path to hardware class description. > >> > HWCLASS_PATH="/sys/devices/platform/chromeos_acpi/HWID" > >> > > >> > +# Ignore PAUSE_CRASH_SENDING file if set. > >> > +OVERRIDE_PAUSE_SENDING=${OVERRIDE_PAUSE_SENDING:-0} > >> > + > >> > # Maximum crashes to send per day. > >> > MAX_CRASH_RATE=${MAX_CRASH_RATE:-32} > >> > > >> > @@ -343,7 +346,8 @@ send_crashes() { > >> > > >> > main() { > >> > trap cleanup EXIT INT TERM > >> > - if [ -e "${PAUSE_CRASH_SENDING}" ]; then > >> > + if [ -e "${PAUSE_CRASH_SENDING}" ] && \ > >> > + [ ${OVERRIDE_PAUSE_SENDING} -eq 0 ]; then > >> > lecho "Exiting early due to ${PAUSE_CRASH_SENDING}." > >> > exit 1 > >> > fi > >> > > >> > > >> > > > > > >
I believe the problem is that I'm using git cl upload --send-mail after committing several changes to my git branch, and it generates the issue name out of the last change (which is usually not so informative, like this). I'll be more careful about using this shortcut in the future. On Mon, Oct 18, 2010 at 10:01 AM, Ken Mixter <kmixter@chromium.org> wrote: > Heh - yeah. The email subject came from one of my last edits to the CL, > not the first CL message. > > > On Mon, Oct 18, 2010 at 9:57 AM, Chris Sosa <sosa@google.com> wrote: > >> Agreed, please edit issue before committing on both these CL's so that >> git history shows what you want which is: "crash-reporter: fix race >> condition between cron crash_sender and test invoked" >> >> On Mon, Oct 18, 2010 at 9:41 AM, Sam Leffler <sleffler@chromium.org> >> wrote: >> > Can we get some better issue/subjects on these CL's? >> > -Sam >> > >> > On Sun, Oct 17, 2010 at 7:23 PM, Chris Sosa <sosa@chromium.org> wrote: >> >> >> >> LGTM >> >> >> >> On Sun, Oct 17, 2010 at 2:55 PM, <kmixter@chromium.org> wrote: >> >> > Reviewers: sosa, >> >> > >> >> > Description: >> >> > fix bug >> >> > >> >> > Change-Id: Ia6edf08d7061399b7e717f475d11cac1ffc259ad >> >> > >> >> > crash-reporter: fix race condition between cron crash_sender and test >> >> > invoked >> >> > >> >> > Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0 >> >> > >> >> > BUG=7765 >> >> > TEST=CrashSender and UserCrash >> >> > >> >> > Please review this at http://codereview.chromium.org/3748011/show >> >> > >> >> > SVN Base: http://git.chromium.org/git/crash-reporter.git >> >> > >> >> > Affected files: >> >> > M crash_sender >> >> > >> >> > >> >> > Index: crash_sender >> >> > diff --git a/crash_sender b/crash_sender >> >> > index >> >> > >> >> > >> c9eec0591f9d46fce8a1e9d1a1d2d6d517a859a0..244c31d2a19e0bcd1a66b0e337a4a614f49d14a3 >> >> > 100644 >> >> > --- a/crash_sender >> >> > +++ b/crash_sender >> >> > @@ -28,6 +28,9 @@ FORCE_OFFICIAL=${FORCE_OFFICIAL:-0} >> >> > # Path to hardware class description. >> >> > HWCLASS_PATH="/sys/devices/platform/chromeos_acpi/HWID" >> >> > >> >> > +# Ignore PAUSE_CRASH_SENDING file if set. >> >> > +OVERRIDE_PAUSE_SENDING=${OVERRIDE_PAUSE_SENDING:-0} >> >> > + >> >> > # Maximum crashes to send per day. >> >> > MAX_CRASH_RATE=${MAX_CRASH_RATE:-32} >> >> > >> >> > @@ -343,7 +346,8 @@ send_crashes() { >> >> > >> >> > main() { >> >> > trap cleanup EXIT INT TERM >> >> > - if [ -e "${PAUSE_CRASH_SENDING}" ]; then >> >> > + if [ -e "${PAUSE_CRASH_SENDING}" ] && \ >> >> > + [ ${OVERRIDE_PAUSE_SENDING} -eq 0 ]; then >> >> > lecho "Exiting early due to ${PAUSE_CRASH_SENDING}." >> >> > exit 1 >> >> > fi >> >> > >> >> > >> >> > >> > >> > >> > >
You could also use git commit -a --amend to amend to the original git commit with cleanup etc so that you can use your git commit msg from the first commit. On Mon, Oct 18, 2010 at 10:39 AM, Ken Mixter <kmixter@chromium.org> wrote: > I believe the problem is that I'm using git cl upload --send-mail after > committing several changes to my git branch, and it generates the issue name > out of the last change (which is usually not so informative, like this). > I'll be more careful about using this shortcut in the future. > > On Mon, Oct 18, 2010 at 10:01 AM, Ken Mixter <kmixter@chromium.org> wrote: >> >> Heh - yeah. The email subject came from one of my last edits to the CL, >> not the first CL message. >> >> On Mon, Oct 18, 2010 at 9:57 AM, Chris Sosa <sosa@google.com> wrote: >>> >>> Agreed, please edit issue before committing on both these CL's so that >>> git history shows what you want which is: "crash-reporter: fix race >>> condition between cron crash_sender and test invoked" >>> >>> On Mon, Oct 18, 2010 at 9:41 AM, Sam Leffler <sleffler@chromium.org> >>> wrote: >>> > Can we get some better issue/subjects on these CL's? >>> > -Sam >>> > >>> > On Sun, Oct 17, 2010 at 7:23 PM, Chris Sosa <sosa@chromium.org> wrote: >>> >> >>> >> LGTM >>> >> >>> >> On Sun, Oct 17, 2010 at 2:55 PM, <kmixter@chromium.org> wrote: >>> >> > Reviewers: sosa, >>> >> > >>> >> > Description: >>> >> > fix bug >>> >> > >>> >> > Change-Id: Ia6edf08d7061399b7e717f475d11cac1ffc259ad >>> >> > >>> >> > crash-reporter: fix race condition between cron crash_sender and >>> >> > test >>> >> > invoked >>> >> > >>> >> > Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0 >>> >> > >>> >> > BUG=7765 >>> >> > TEST=CrashSender and UserCrash >>> >> > >>> >> > Please review this at http://codereview.chromium.org/3748011/show >>> >> > >>> >> > SVN Base: http://git.chromium.org/git/crash-reporter.git >>> >> > >>> >> > Affected files: >>> >> > M crash_sender >>> >> > >>> >> > >>> >> > Index: crash_sender >>> >> > diff --git a/crash_sender b/crash_sender >>> >> > index >>> >> > >>> >> > >>> >> > c9eec0591f9d46fce8a1e9d1a1d2d6d517a859a0..244c31d2a19e0bcd1a66b0e337a4a614f49d14a3 >>> >> > 100644 >>> >> > --- a/crash_sender >>> >> > +++ b/crash_sender >>> >> > @@ -28,6 +28,9 @@ FORCE_OFFICIAL=${FORCE_OFFICIAL:-0} >>> >> > # Path to hardware class description. >>> >> > HWCLASS_PATH="/sys/devices/platform/chromeos_acpi/HWID" >>> >> > >>> >> > +# Ignore PAUSE_CRASH_SENDING file if set. >>> >> > +OVERRIDE_PAUSE_SENDING=${OVERRIDE_PAUSE_SENDING:-0} >>> >> > + >>> >> > # Maximum crashes to send per day. >>> >> > MAX_CRASH_RATE=${MAX_CRASH_RATE:-32} >>> >> > >>> >> > @@ -343,7 +346,8 @@ send_crashes() { >>> >> > >>> >> > main() { >>> >> > trap cleanup EXIT INT TERM >>> >> > - if [ -e "${PAUSE_CRASH_SENDING}" ]; then >>> >> > + if [ -e "${PAUSE_CRASH_SENDING}" ] && \ >>> >> > + [ ${OVERRIDE_PAUSE_SENDING} -eq 0 ]; then >>> >> > lecho "Exiting early due to ${PAUSE_CRASH_SENDING}." >>> >> > exit 1 >>> >> > fi >>> >> > >>> >> > >>> >> > >>> > >>> > >> > >
Thanks, I wasn't aware of that option. On Mon, Oct 18, 2010 at 11:24 AM, Chris Sosa <sosa@chromium.org> wrote: > You could also use git commit -a --amend to amend to the original git > commit with cleanup etc so that you can use your git commit msg from > the first commit. > > On Mon, Oct 18, 2010 at 10:39 AM, Ken Mixter <kmixter@chromium.org> wrote: > > I believe the problem is that I'm using git cl upload --send-mail after > > committing several changes to my git branch, and it generates the issue > name > > out of the last change (which is usually not so informative, like this). > > I'll be more careful about using this shortcut in the future. > > > > On Mon, Oct 18, 2010 at 10:01 AM, Ken Mixter <kmixter@chromium.org> > wrote: > >> > >> Heh - yeah. The email subject came from one of my last edits to the CL, > >> not the first CL message. > >> > >> On Mon, Oct 18, 2010 at 9:57 AM, Chris Sosa <sosa@google.com> wrote: > >>> > >>> Agreed, please edit issue before committing on both these CL's so that > >>> git history shows what you want which is: "crash-reporter: fix race > >>> condition between cron crash_sender and test invoked" > >>> > >>> On Mon, Oct 18, 2010 at 9:41 AM, Sam Leffler <sleffler@chromium.org> > >>> wrote: > >>> > Can we get some better issue/subjects on these CL's? > >>> > -Sam > >>> > > >>> > On Sun, Oct 17, 2010 at 7:23 PM, Chris Sosa <sosa@chromium.org> > wrote: > >>> >> > >>> >> LGTM > >>> >> > >>> >> On Sun, Oct 17, 2010 at 2:55 PM, <kmixter@chromium.org> wrote: > >>> >> > Reviewers: sosa, > >>> >> > > >>> >> > Description: > >>> >> > fix bug > >>> >> > > >>> >> > Change-Id: Ia6edf08d7061399b7e717f475d11cac1ffc259ad > >>> >> > > >>> >> > crash-reporter: fix race condition between cron crash_sender and > >>> >> > test > >>> >> > invoked > >>> >> > > >>> >> > Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0 > >>> >> > > >>> >> > BUG=7765 > >>> >> > TEST=CrashSender and UserCrash > >>> >> > > >>> >> > Please review this at http://codereview.chromium.org/3748011/show > >>> >> > > >>> >> > SVN Base: http://git.chromium.org/git/crash-reporter.git > >>> >> > > >>> >> > Affected files: > >>> >> > M crash_sender > >>> >> > > >>> >> > > >>> >> > Index: crash_sender > >>> >> > diff --git a/crash_sender b/crash_sender > >>> >> > index > >>> >> > > >>> >> > > >>> >> > > c9eec0591f9d46fce8a1e9d1a1d2d6d517a859a0..244c31d2a19e0bcd1a66b0e337a4a614f49d14a3 > >>> >> > 100644 > >>> >> > --- a/crash_sender > >>> >> > +++ b/crash_sender > >>> >> > @@ -28,6 +28,9 @@ FORCE_OFFICIAL=${FORCE_OFFICIAL:-0} > >>> >> > # Path to hardware class description. > >>> >> > HWCLASS_PATH="/sys/devices/platform/chromeos_acpi/HWID" > >>> >> > > >>> >> > +# Ignore PAUSE_CRASH_SENDING file if set. > >>> >> > +OVERRIDE_PAUSE_SENDING=${OVERRIDE_PAUSE_SENDING:-0} > >>> >> > + > >>> >> > # Maximum crashes to send per day. > >>> >> > MAX_CRASH_RATE=${MAX_CRASH_RATE:-32} > >>> >> > > >>> >> > @@ -343,7 +346,8 @@ send_crashes() { > >>> >> > > >>> >> > main() { > >>> >> > trap cleanup EXIT INT TERM > >>> >> > - if [ -e "${PAUSE_CRASH_SENDING}" ]; then > >>> >> > + if [ -e "${PAUSE_CRASH_SENDING}" ] && \ > >>> >> > + [ ${OVERRIDE_PAUSE_SENDING} -eq 0 ]; then > >>> >> > lecho "Exiting early due to ${PAUSE_CRASH_SENDING}." > >>> >> > exit 1 > >>> >> > fi > >>> >> > > >>> >> > > >>> >> > > >>> > > >>> > > >> > > > > > |