airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
204 stars 11 forks source link

[macOS] Building AIR package randomly fails on macOS SDK 33.1.1.476 #844

Closed johnou closed 2 years ago

johnou commented 3 years ago

Problem Description

Describe your problem in detail. Include the following information:

33.1.1.476

OS Version: Mac OS X 10.15.6 (Build 19G2021) Architecture: x86_64

60%~

Furthermore, always add a link to one or more analog Adobe Tracker issues. This repository is not a replacement for Adobe's bug tracker!

Steps to Reproduce

Tell us how this issue can be reproduced. Seriously: if you want this issue to be fixed, this is the part you really need to get nailed. Give us a minimal example:

I suspect there is a race condition with naip, often the process just hangs in the process list like so..

xxxxx 97629   0.0  0.2  4585816  26756   ??  S     1:06PM   0:00.13 /opt/air-sdks/air_sdk_harman_33.1.1.476/lib/nai/bin/naip -convert /Volumes/external/xxxxxx/target/air4575753230900883879.tmp /Volumes/external/xxxxxx/target/adt3823396362332371453.tmp/temp

Until recently the app just hung but now we are also seeing this in the CI build output

     [java] [Fatal Error] PropertyList-1.0.dtd:1:2: The markup declarations contained or pointed to by the document type declaration must be well-formed.
     [java] unexpected failure: PLIST generation failed due to SAX error:org.xml.sax.SAXParseExceptionpublicId: -//Apple Computer//DTD PLIST 1.0//EN; systemId: http://www.apple.com/DTDs/PropertyList-1.0.dtd; lineNumber: 1; columnNumber: 2; The markup declarations contained or pointed to by the document type declaration must be well-formed.
     [java] java.io.IOException: PLIST generation failed due to SAX error:org.xml.sax.SAXParseExceptionpublicId: -//Apple Computer//DTD PLIST 1.0//EN; systemId: http://www.apple.com/DTDs/PropertyList-1.0.dtd; lineNumber: 1; columnNumber: 2; The markup declarations contained or pointed to by the document type declaration must be well-formed.
     [java]     at com.adobe.air.Plist.newFromString(Plist.java)
     [java]     at com.adobe.air.Plist.newFromFile(Plist.java)
     [java]     at com.adobe.air.nai.AppBundlePackager.assembleInternalFiles(AppBundlePackager.java)
     [java]     at com.adobe.air.nai.NativePackager.createPackage(NativePackager.java)
     [java]     at com.adobe.air.ADT.parseArgsAndGo(ADT.java)
     [java]     at com.adobe.air.ADT.run(ADT.java)
     [java]     at com.adobe.air.ADT.main(ADT.java)
  Thread 0xf3aa8    Thread name "Java: process reaper"    999 samples (1-999)    priority 20 (base 20)
  999  thread_start + 15 (libsystem_pthread.dylib + 7051) [0x7fff6bbdeb8b]
    999  _pthread_start + 148 (libsystem_pthread.dylib + 24841) [0x7fff6bbe3109]
      999  ??? [0x10dc8f30a]
        999  ??? [0x10dd7228e]
          999  ??? [0x10dd70b93]
            999  ??? [0x10db4bf5d]
              999  ??? [0x10daf166e]
                999  ??? [0x10daf14c2]
                  999  ??? [0x10daf0d1e]
                    999  ??? [0x1153c47a7]
                      999  ??? [0x1153cc302]
                        999  ??? [0x1153cc2bd]
                          999  ??? [0x1153cc302]
                            999  ??? [0x1153cc2bd]
                              999  ??? [0x1153cbd00]
                                999  ??? [0x1153dc667]
                                  999  __wait4 + 10 (libsystem_kernel.dylib + 25730) [0x7fff6bb21482]
                                   *999  ??? (kernel + 6845584) [0xffffff8000887490] (blocked by wait4 on naip [68380] [unique pid 466435])
Process:          naip [68380] [unique pid 466435]
UUID:             4114AB90-2529-34D7-9949-0F906833FC0D
Path:             /opt/air-sdks/air_sdk_harman_33.1.1.476/lib/nai/bin/naip
Architecture:     x86_64
Parent:           adt [68313] [unique pid 466368]
UID:              502
Footprint:        13.24 MB
Start time:       2021-04-27 22:59:37 +0300
End time:         2021-04-27 22:59:47 +0300
Num samples:      999 (1-999)
CPU Time:         0.005s (4.1M cycles, 1291.6K instructions, 3.19c/i)
Note:             1 idle work queue thread omitted

  Thread 0xf3bac    DispatchQueue "com.apple.main-thread"(1)    999 samples (1-999)    priority 20 (base 20)
  999  start + 52 (naip + 11720) [0x10e420dc8]
    999  RuntimeMain(char const*, int) + 174 (naip + 13079) [0x10e421317]
      999  ??? [0x10e447c17]
        999  -[NSApplication run] + 658 (AppKit + 202126) [0x7fff2eac358e]
          999  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 (AppKit + 260224) [0x7fff2ead1880]
            999  _DPSNextEvent + 883 (AppKit + 266297) [0x7fff2ead3039]
              999  _BlockUntilNextEventMatchingListInModeWithFilter + 64 (HIToolbox + 193913) [0x7fff3048d579]
                999  ReceiveNextEventCommon + 584 (HIToolbox + 194517) [0x7fff3048d7d5]
                  999  RunCurrentEventLoopInMode + 292 (HIToolbox + 195261) [0x7fff3048dabd]
                    999  CFRunLoopRunSpecific + 466 (CoreFoundation + 534867) [0x7fff31872953]
                      999  __CFRunLoopRun + 1329 (CoreFoundation + 537825) [0x7fff318734e1]
                        999  __CFRunLoopServiceMachPort + 247 (CoreFoundation + 543271) [0x7fff31874a27]
                          999  mach_msg_trap + 10 (libsystem_kernel.dylib + 3578) [0x7fff6bb1bdfa]
                           *999  ipc_mqueue_receive_continue + 0 (kernel + 1032304) [0xffffff80002fc070]

  Thread 0xf3bc5    Thread name "BackgroundThread"    999 samples (1-999)    priority 20 (base 20)
  999  <truncated backtrace>
    999  __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff6bb1e882]
     *999  psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82dc6922]

  Thread 0xf3bc6    Thread name "BackgroundThread"    999 samples (1-999)    priority 20 (base 20)
  999  <truncated backtrace>
    999  __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff6bb1e882]
     *999  psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82dc6922]

  Thread 0xf3bc7    Thread name "BackgroundThread"    999 samples (1-999)    priority 20 (base 20)
  999  <truncated backtrace>
    999  __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff6bb1e882]
     *999  psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82dc6922]

  Thread 0xf3bc8    Thread name "BackgroundThread"    999 samples (1-999)    priority 20 (base 20)
  999  <truncated backtrace>
    999  __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff6bb1e882]
     *999  psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82dc6922]

  Thread 0xf3bc9    Thread name "AMCP Logging Spool"    999 samples (1-999)    priority 19 (base 19)
  999  <truncated backtrace>
    999  semaphore_wait_trap + 10 (libsystem_kernel.dylib + 3638) [0x7fff6bb1be36]
     *999  semaphore_wait_continue + 0 (kernel + 1338128) [0xffffff8000346b10]

  Thread 0xf3bca    999 samples (1-999)    priority 20 (base 20)
  999  <truncated backtrace>
    999  semaphore_wait_trap + 10 (libsystem_kernel.dylib + 3638) [0x7fff6bb1be36]
     *999  semaphore_wait_continue + 0 (kernel + 1338128) [0xffffff8000346b10]

  Thread 0xf3bd0    Thread name "ScriptTimeout"    999 samples (1-999)    priority 20 (base 20)    cpu time 0.005s (4.1M cycles, 1291.6K instructions, 3.19c/i)
  999  thread_start + 15 (libsystem_pthread.dylib + 7051) [0x7fff6bbdeb8b]
    999  _pthread_start + 148 (libsystem_pthread.dylib + 24841) [0x7fff6bbe3109]
      999  ??? [0x10eaf6644]
        999  ??? [0x10eaf684d]
          999  ??? [0x10eaf67c0]
            999  ??? [0x10eba5246]
              999  ??? [0x10eaf6a0d]
                999  __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff6bb1e882]
                 *998  psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82dc6922]
                 *1    call_continuation + 35 (kernel + 786739) [0xffffff80002c0133]
                   *1    ml_set_interrupts_enabled + 25 (kernel + 2357657) [0xffffff800043f999] (running)

  Binary Images:
           0x10e41e000 -        0x10e421fff  naip                                    <4114AB90-2529-34D7-9949-0F906833FC0D>  /opt/air-sdks/air_sdk_harman_33.1.1.476/lib/nai/bin/naip
        0x7fff2ea92000 -     0x7fff2f852fff  com.apple.AppKit 6.9 (1894.60.100)      <C5D84BE3-FD1B-3141-BB78-487A83256DC5>  /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
        0x7fff3045e000 -     0x7fff30752fff  com.apple.HIToolbox 2.1.1 (994.6)       <EAF2DAC3-66B1-30BF-AF10-72DDA90D1044>  /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
        0x7fff317f0000 -     0x7fff31c70fff  com.apple.CoreFoundation 6.9 (1677.104) <A22035B1-72B8-3855-8E09-205590C7885F>  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
        0x7fff6bb1b000 -     0x7fff6bb47fff  libsystem_kernel.dylib (6153.141.1)     <2B6311E6-6240-3EF7-8C87-475B66F7452C>  /usr/lib/system/libsystem_kernel.dylib
        0x7fff6bbdd000 -     0x7fff6bbe7fff  libsystem_pthread.dylib (416.100.3)     <62CB1A98-0B8F-31E7-A02B-A1139927F61D>  /usr/lib/system/libsystem_pthread.dylib
   *0xffffff7f82dc2000 - 0xffffff7f82dc9fff  com.apple.kec.pthread 1.0 (1)           <C9486906-995B-3F43-A336-95AAF9FA5BA1>  /System/Library/Extensions/pthread.kext/Contents/MacOS/pthread
   *0xffffff8000200000 - 0xffffff8000bfffff  kernel (6153.141.1)                     <1D3A0F3D-D908-397B-BD16-8F48C0823A2E>  /System/Library/Kernels/kernel
ajwfrost commented 3 years ago

Hi

I don't suppose you see the temporary files left around..? e.g. /Volumes/external/xxxxxx/target/air4575753230900883879.tmp from your naip output above? If so it would be interesting to see what the content of the Contents/Info.plist file would be in there..

We're not seeing the same problems here .. it looks like there are two separate possibilities: a) the generated plist file is throwing an error b) naip is hanging

Do you see this happening with a simple/empty "hello world" style application, or is it just with a more complex app with assets, ANEs etc?

thanks

Andrew

johnou commented 3 years ago

Hi Andrew,

Unfortunately a complex app with assets and ANEs.

Another thing to note about our setup is that the macOS build slave in mention compiles multiple AIR applications at the same time and from different AIR SDKs - not sure if that could cause any undesired behaviour.

The next time it occurs I will try and get a copy of the tmp file(s), unfortunately they were located in the CI build workspace which is cleared every time a new build is triggered..

Johno

ajwfrost commented 3 years ago

Interesting! I am wondering what might happen if multiple instances of naip were run in parallel: essentially this is an AIR application itself, so there's a risk it may have the same "invocation forwarded to primary instance" effect - although that shouldn't hang it, as it should then exit straight away. But it's something we can check; or if there's any way you could set the builds up to queue things and process them one at a time, it might be worth seeing if that helps.

We could also add in some extra diagnostics, which is something we're gradually doing anywhere in all of this ..

thanks

johnou commented 2 years ago

Haven't seen this in awhile, will reopen if it occurs again.