You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2020/08/17 03:49:38 UTC

[GitHub] [incubator-weex] st-dc opened a new issue #3255: [Android]Android 11 Not working properly

st-dc opened a new issue #3255:
URL: https://github.com/apache/incubator-weex/issues/3255


   The test found that Android 11 mobile phone can't run weex normally


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] lb4110991 commented on issue #3255: [Android]Android 11 Not working properly

Posted by GitBox <gi...@apache.org>.
lb4110991 commented on issue #3255:
URL: https://github.com/apache/incubator-weex/issues/3255#issuecomment-737890574


   > I found the result of **fork() is not 0**, so enter the condition three. m_impl->futexPageQueue->spinWaitPeer() will call **sched_yield()**,until **timeout**.
   > 
   > I am puzzled, what has changed in fork(), on android11 ​​phones.
   > 
   > IPCSender *WeexJSConnection::start(bool reinit) {
   > ......
   > 
   > // static bool startupPie = s_start_pie;
   > static bool startupPie = SoUtils::pie_support();
   > LOGE("startupPie :%d", startupPie);
   > 
   > pid_t child;
   > if (reinit) {
   > #if PRINT_LOG_CACHEFILE
   > mcfile << "reinit is ture use vfork" << std::endl;
   > mcfile.close();
   > #endif
   > child = vfork();
   > } else {
   > #if PRINT_LOG_CACHEFILE
   > mcfile << "reinit is false use fork" << std::endl;
   > mcfile.close();
   > #endif
   > child = fork();
   > }
   > LOGD("fork result=%d", child);
   > if (child == -1) {
   > int myerrno = errno;
   > munmap(base, IPCFutexPageQueue::ipc_size);
   > throw IPCException("failed to fork: %s", strerror(myerrno));
   > } else if (child == 0 || child == 6743) {
   > LOGE("weexcore fork child success\n");
   > // the child
   > closeAllButThis(client_->ipcFd, server_->ipcFd);
   > // implements close all but handles[1]
   > // do exec
   > doExec(client_->ipcFd, server_->ipcFd, true, startupPie);
   > LOGE("exec Failed completely.");
   > // failed to exec
   > _exit(1);
   > } else {
   > **//step into here ====condition three**
   > printLogOnFile("fork success on main process and start m_impl->futexPageQueue->spinWaitPeer()");
   > LOGD("fork success on main process and start m_impl->futexPageQueue->spinWaitPeer()");
   > m_impl->child = child;
   > try {
   > m_impl->futexPageQueue->spinWaitPeer();
   > } catch (IPCException &e) {
   > LOGE("WeexJSConnection catch: %s", e.msg());
   > // TODO throw exception
   > if(s_in_find_icu) {
   > // WeexCore::WeexProxy::reportNativeInitStatus("-1013", "find icu timeout");
   > }
   > return nullptr;
   > }
   > }
   > return m_impl->serverSender.get();
   > }
   
   hello, Have you solved this problem?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] freddyzhu commented on issue #3255: [Android]Android 11 Not working properly

Posted by GitBox <gi...@apache.org>.
freddyzhu commented on issue #3255:
URL: https://github.com/apache/incubator-weex/issues/3255#issuecomment-694080086


   I found the result of **fork() is not 0**, so enter the condition three. m_impl->futexPageQueue->spinWaitPeer() will call **sched_yield()**,until **timeout**.
   
   I am puzzled, what has changed in fork(), on android11 ​​phones.
   
   IPCSender *WeexJSConnection::start(bool reinit) {
   ......
   
   
   //  static bool startupPie = s_start_pie;
     static bool startupPie = SoUtils::pie_support();
     LOGE("startupPie :%d", startupPie);
   
     pid_t child;
     if (reinit) {
   #if PRINT_LOG_CACHEFILE
       mcfile << "reinit is ture use vfork" << std::endl;
       mcfile.close();
   #endif
       child = vfork();
     } else {
   #if PRINT_LOG_CACHEFILE
       mcfile << "reinit is false use fork" << std::endl;
       mcfile.close();
   #endif
       child = fork();
     }
     LOGD("fork result=%d", child);
     if (child == -1) {
       int myerrno = errno;
       munmap(base, IPCFutexPageQueue::ipc_size);
       throw IPCException("failed to fork: %s", strerror(myerrno));
     } else if (child == 0 || child == 6743) {
       LOGE("weexcore fork child success\n");
       // the child
       closeAllButThis(client_->ipcFd, server_->ipcFd);
       // implements close all but handles[1]
       // do exec
       doExec(client_->ipcFd, server_->ipcFd, true, startupPie);
       LOGE("exec Failed completely.");
       // failed to exec
       _exit(1);
     } else {
   **//step into here ====condition three**
       printLogOnFile("fork success on main process and start m_impl->futexPageQueue->spinWaitPeer()");
       LOGD("fork success on main process and start m_impl->futexPageQueue->spinWaitPeer()");
       m_impl->child = child;
       try {
         m_impl->futexPageQueue->spinWaitPeer();
       } catch (IPCException &e) {
         LOGE("WeexJSConnection catch: %s", e.msg());
         // TODO throw exception
         if(s_in_find_icu) {
   //        WeexCore::WeexProxy::reportNativeInitStatus("-1013", "find icu timeout");
         }
         return nullptr;
       }
     }
     return m_impl->serverSender.get();
   }


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] freddyzhu commented on issue #3255: [Android]Android 11 Not working properly

Posted by GitBox <gi...@apache.org>.
freddyzhu commented on issue #3255:
URL: https://github.com/apache/incubator-weex/issues/3255#issuecomment-693403490


   Google has released Android 11, maybe it's a big question.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] freddyzhu commented on issue #3255: [Android]Android 11 Not working properly

Posted by GitBox <gi...@apache.org>.
freddyzhu commented on issue #3255:
URL: https://github.com/apache/incubator-weex/issues/3255#issuecomment-693402772


   i have the same problem with android 11 mobile phone.
   Error Log is here:
   2020-09-16 20:17:04.304 8213-8401/com.fusionbank.vb E/WeexCore: weex_js_connection.cpp:252,startupPie :1
   2020-09-16 20:17:37.300 8213-8401/com.fusionbank.vb E/WeexCore: weex_js_connection.cpp:288,WeexJSConnection catch: spinWaitPeer timeout
   2020-09-16 20:17:37.300 8213-8908/com.fusionbank.vb E/WeexCore: weex_js_connection.cpp:183,IPCException server died spinWaitPeer timeout
   2020-09-16 20:17:37.300 8213-8401/com.fusionbank.vb E/WeexCore: multi_process_and_so_initializer.cpp:47,JSFramwork init start sender is null
   2020-09-16 20:17:37.300 8213-8401/com.fusionbank.vb D/WeexCore: IPCFutexPageQueue.cpp:81,unlock: 0
   2020-09-16 20:17:37.304 8213-8401/com.fusionbank.vb E/WeexCore: script_side_in_multi_process.cpp:43,InitFramework sender is null
   2020-09-16 20:17:37.304 8213-8401/com.fusionbank.vb E/weex: [WXBridgeManager] invokeInitFramework  ExecuteJavaScript fail


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org