Closed Bug 379040 Opened 17 years ago Closed 11 years ago

Win2k3 tinderbox exiting with status 1280

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: sayrer, Unassigned)

References

()

Details

Attachments

(2 files)

Windows error code 1280 is ERROR_ALREADY_FIBER. It makes sense that we would see this only on the Win2k3 box, Raymond Chen tells us that

  "ERROR_ALREADY_FIBER is returned only on Windows Server 2003. For Windows 98,
   2000, and XP, converting a thread to a fiber twice results in random behavior."

  <blogs.msdn.com/oldnewthing/archive/2004/12/31/344799.aspx>
for informational purposes, here's a text search for "fiber" in lxr. Mostly nspr and security code.
also, could this be a side-effect of the root cause of the OS X crashes we're seeing on shutdown?

https://bugzilla.mozilla.org/show_bug.cgi?id=321024

Seems we're doing something out-of-order here.
Attachment #263562 - Flags: review?(rhelmer)
Comment on attachment 263562 [details] [diff] [review]
redo the invocation, so we capture all the output

>Index: runtests.pl.in
>===================================================================
>RCS file: /cvsroot/mozilla/testing/mochitest/runtests.pl.in,v
>retrieving revision 1.13
>diff -u -8 -p -r1.13 runtests.pl.in
>--- runtests.pl.in	21 Apr 2007 03:27:59 -0000	1.13
>+++ runtests.pl.in	3 May 2007 06:20:09 -0000
>@@ -470,52 +470,44 @@ sub runTests {
>   my $profile_arg = "$profile_dir";
>   if ($is_win32) {
>     $profile_arg = winPathFromDir($profile_dir);
>   }
> 
>   # now run with the profile we created
> 
>   # On Windows and Linux, the application is focused for us. On OS X, we
>-  # need to use applescript to focus the app and then set the url.
>+  # need to use an arg to foreground the app.
>   my $rc = -1;
>-  if (!$is_mac) {
>-    my @runargs = ($app, '-no-remote', '-profile', $profile_arg);
>-    push(@runargs, $test_url);
>-    $rc = 0xffff & system @runargs;
>-  } else {
>-    $rc = executeMac($profile_arg, $test_url);
>+  my @runargs = ($app);
>+  if ($is_mac) {
>+    push(@runargs, '-foreground');
>   }
>+  push(@runargs, '-no-remote');
>+  push(@runargs, '-profile');
>+  push(@runargs, $profile_arg);
>+  push(@runargs, $test_url);
>+  push(@runargs, '2>&1');
>+  push(@runargs, '|');


I think having these on the same line instead of pushed individually is more readable, but up to you.


>+  my $mozargs = join(" ",@runargs);
>+  
>+  open (MOZOUTPUT, "$mozargs");
>+  while (<MOZOUTPUT>){
>+    print $_;
>+  }
>+  $rc = $?;
>+  close MOZOUTPUT;


Check for errors on open and close? e.g. -

open (...) or die("couldn't open: $!");


> 
>   if ($rc != 0) {
>     print "FAIL Exited with code $rc during test run\n";
>   }
> 
>   return $test_start;
> }
> 
>-sub executeMac {
>-  my ($profile_arg, $test_url) = @_;
>-  my $pid = fork();
>-  if (not defined $pid) {
>-    die "cannot fork: $!";
>-  } elsif ($pid == 0) {
>-    # run only the executable so we get a pid we can focus
>-    $app .= "-bin";
>-    my @runargs = ($app, '-foreground', '-no-remote', '-profile', $profile_arg);
>-    push(@runargs, $test_url);
>-    exec @runargs or die("Error starting application: $!\n");
>-  } else {
>-    waitpid($pid,0);
>-  }
>-
>-  # return the exit code we received from waitpid
>-  return $?;
>-}
>-


removing old code ftw

r=rhelmer with the error checking for the file open/close.
Attachment #263562 - Flags: review?(rhelmer) → review+
I can only find one instance of ConvertThreadToFiber in our code:
http://mxr.mozilla.org/mozilla/source/nsprpub/pr/src/md/windows/ntthread.c#432

How would this be returning this error code?
so, this turned out to be way too slow, and burned on Windows.
Attachment #263617 - Flags: review?(rcampbell)
Attachment #263617 - Flags: review?(rcampbell) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: