Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Crosswalk crash when user try to switch app in task manager on Tizen 2.1 #609

Closed
ininallen opened this issue Sep 9, 2013 · 37 comments
Closed

Comments

@ininallen
Copy link

BUG DETAILED DESCRIPTIONS
Pack xpk app by xpk generator, install and launch this xpk app and try to switch this app back task manger, however two process about this app shows

Environment:
Tizen2.1: build 131
PR3 device

EXACT STEPS LEADING TO PROBLEM:

  1. Pack xpk app by typing "create_xpk "
  2. Install app by typing "xwalk --install
  3. Launch this app by command line or clicking icon on home screen
  4. Press HW button "Lock" to background app
  5. Long press home button to open task manager
  6. Click app process in task manager

EXPECTED OUTCOME:
Able to switch back to app

ACTUAL OUTCOME:
Crosswalk crash

USER IMPACT:
It impact user experience

@yongkang
Copy link

yongkang commented Sep 9, 2013

@luxtella could you please take a look at this issue?

@ds-hwang
Copy link
Contributor

ds-hwang commented Sep 9, 2013

@yongkang yes.

Can you send me sample xpk? [email protected]

@ds-hwang
Copy link
Contributor

ds-hwang commented Sep 9, 2013

crosswalk-project/chromium-crosswalk#61 makes web app item on task switcher only one, not two.

#588 makes us be able to push home key, instead of lock&unlock.

This bug needs #570 because xwalk should handle appcore events.

@ds-hwang
Copy link
Contributor

ds-hwang commented Sep 9, 2013

The web app that is installed using xwalk --install seems not to be installed properly.

sh-4.1# pkgcmd -s -t rpm -n pfmkihbgikjodihpjniekehkddobanhe
Failed to get pkginfo handle
processing result : Unknown Error [0] failed
spend time for pkgcmd is [409]ms

For example, clock show as follows:

sh-4.1# pkgcmd -s -t rpm -n org.tizen.clock  
pkg_type : rpm
pkgid : org.tizen.clock
version : 0.2.57
pkg_description : clock application
min_platform_version : 
installed_size : 6954556
installed_time : 0
data_size : 0
optional_id : 
spend time for pkgcmd is [847]ms

Task switcher kills process if the process does not satisfy package requirements.
Could you change xwalk installer to install web apps like native apps?

@ds-hwang
Copy link
Contributor

ds-hwang commented Sep 9, 2013

@kenchris , @poussa ^

@poussa
Copy link
Contributor

poussa commented Sep 9, 2013

@luxtella how about one of the list commands, pkgcmd --applist, or something. I dont have the device now. At least that used to list the installed app.

@ds-hwang
Copy link
Contributor

ds-hwang commented Sep 9, 2013

@poussa Web app is installed but not perfectly.

sh-4.1# pkgcmd -l | grep pfm
pkg_type [rpm]  pkgid [pfmkihbgikjodihpjniekehkddobanhe]    name [XWalkDemo]    version [1.1.3.2]

@takethathe
Copy link
Contributor

@luxtella When I packaged a xpk file into rpm, and install it on Tizen 2.1, the command "pkgcmd" works well:

sh-4.1# pkgcmd -s -t rpm -n oaebeffdeaajdminlhgehcgmahiflini
pkg_type : rpm
pkgid : oaebeffdeaajdminlhgehcgmahiflini
version : 1.0
pkg_description : Test for Memory Game
min_platform_version : 
installed_size : 15241656
installed_time : 0
data_size : 0
optional_id : 
spend time for pkgcmd is [553]ms

But this issue still exists. I'm wondering that it caused by our runtime process model, and invalid resume callback mechanism. Here, I want to explain how it happen:

  • Two process about this app shows, after launched an application, there should be at least 4 processes startup, when doing this:
sh-4.1# ps aux | grep oaebeffdeaajdminlhgehcgmahiflini
app       9504 13.7  2.8 405716 28300 ?        Ssl  10:51   0:01 /opt/usr/apps/applications/oaebeffdeaajdminlhgehcgmahiflini/bin/oaebeffdeaajdminlhgehcgmahiflini `zaybxcwdveuftgsh` __AUL_STARTTIME__ NAAAAAEEAAASAAAAX19BVUxfU1RBUlRUSU1FX18AEgAAADEzNzg3Nzc5MDUvNzAxMDIyAA== __AUL_CALLER_PID__ JwAAAAEEAAATAAAAX19BVUxfQ0FMTEVSX1BJRF9fAAQAAAA3NjAA __AUL_CALLER_APPID__ OwAAAAEEAAAVAAAAX19BVUxfQ0FMTEVSX0FQUElEX18AFgAAAG9yZy50aXplbi5tZW51LXNjcmVlbgA=
app       9505  0.8  0.2 116652  2884 ?        S    10:51   0:00 /opt/usr/apps/applications/oaebeffdeaajdminlhgehcgmahiflini/bin/oaebeffdeaajdminlhgehcgmahiflini `zaybxcwdveuftgsh` __AUL_STARTTIME__ NAAAAAEEAAASAAAAX19BVUxfU1RBUlRUSU1FX18AEgAAADEzNzg3Nzc5MDUvNzAxMDIyAA== __AUL_CALLER_PID__ JwAAAAEEAAATAAAAX19BVUxfQ0FMTEVSX1BJRF9fAAQAAAA3NjAA __AUL_CALLER_APPID__ OwAAAAEEAAAVAAAAX19BVUxfQ0FMTEVSX0FQUElEX18AFgAAAG9yZy50aXplbi5tZW51LXNjcmVlbgA=

There're two processes with the same name, and it's the reason why there're two application in taskmanager.

  • Crash when swith application in taskmanager, I found this message in log:
D/TASKMANAGER( 9436): _genlist.c: _gl_sel_app(229) > [_gl_sel_app,229] func
D/AUL     ( 9436): launch.c: app_request_to_launchpad(232) > launch request : 9349
D/AUL     ( 9436): app_sock.c: __app_send_raw(262) > pid(-2) : cmd(3)
D/AUL     (  401): app_sock.c: __app_send_raw(262) > pid(9349) : cmd(3)
E/AUL     (  401): app_sock.c: __create_client_sock(173) > maybe peer not launched or peer daed
E/AUL     (  401): app_sock.c: __create_client_sock(173) > maybe peer not launched or peer daed
E/AUL_AMD (  401): amd_launch.c: _resume_app(489) > raise failed - 9349 resume fail
E/AUL_AMD (  401): amd_launch.c: _resume_app(490) > we will term the app - 9349
D/AUL_AMD (  401): amd_launch.c: _resume_app(495) > resume done
D/AUL     ( 9436): launch.c: app_request_to_launchpad(243) > launch request result : -1
I/PULSEAUDIO(  403): �[34mclient.c: Freed 167 "Chrome input"�[0m
I/PULSEAUDIO(  403): �[34mprotocol-native.c: Connection died.�[0m
D/AUL_PAD (  406): sigchild.h: __launchpad_sig_child(143) > dead_pid = 9348 pgid = 9348
D/AUL_PAD (  406): sigchild.h: __send_app_dead_signal(81) > send dead signal done
D/starter (  751): lock-daemon.c: lockd_app_dead_cb(172) > [starter/home/abuild/rpmbuild/BUILD/starter-0.4.62/src/lock-daemon.c:172:D] app dead cb call! (pid : 9348)
D/starter (  751): menu_daemon.c: menu_daemon_check_dead_signal(305) > [menu_daemon_check_dead_signal:305] Process 9348 is termianted
D/starter (  751): menu_daemon.c: menu_daemon_check_dead_signal(322) > [menu_daemon_check_dead_signal:322] Unknown process, ignore it (pid 9348, home pid 760)

It said: when AUL sending cmd to process(9349) by __app_send_raw, but the process doesn't return anything, so it guess the process has been terminated, and finished the resume. So I think the root cause is that the xwalk doesn't listen any command comes from AUL daemon.

@luxtella you can take more investigations on these. I guess it's the key points to solve this issue.

@yongkang
Copy link

@luxtella Dongseong, do you have comment? From Xinchao's the investigation, the crashing is not because proper package installation. It might need some fixing from Xwalk. Can you work on it?

@ds-hwang
Copy link
Contributor

@yongkang yes, I'm looking at this.

required condition is that we need #570 because #570 makes xwalk handle aul events
but I'm not sure it is sufficient.

When I made prototype, installing prototype only in both /opt/usr/apps/ and /usr/apps/ makes task manager recognize prototype. we need to check if /opt/usr/apps/application/ get along with task manager.

--> /opt/usr/apps/application/ is fine. Don't worry.

@ininallen
Copy link
Author

This issue is still able to be reproduced on build 137

@ds-hwang
Copy link
Contributor

@takethathe could you send me your xpk file? [email protected]

@ds-hwang
Copy link
Contributor

@takethathe
You calculator still has problem. Could you send me your "Memory Game" xpk?
FYI, I test it on PR3 device.

sh-4.1# pkgcmd -C -t rpm -n jhnafkobpahgnkbhiijoeijbchlfnjeh
Appid: jhnafkobpahgnkbhiijoeijbchlfnjeh is Running
spend time for pkgcmd is [55]ms
sh-4.1# pkgcmd -s -t rpm -n jhnafkobpahgnkbhiijoeijbchlfnjeh
Failed to get pkginfo handle
processing result : Unknown Error [0] failed
spend time for pkgcmd is [844]ms

@takethathe
Copy link
Contributor

@luxtella
I installed the Memory Game using rpm, it just packaged a xpk file in it, and use walk to install in %post section. When package type is "rpm", the pkgcmd will query the rpm db for app info, so what the xwalk haven't to do is insert the application information into rpm db.

@ds-hwang
Copy link
Contributor

@takethathe Thx for explanation.
The difference between xpk and rpm is key point. I think I almost fix it.

btw, could you expect when will uninstall be implemented? We can not remove app info in ApplicationStore just using pkginfo.

@ds-hwang
Copy link
Contributor

I fixed it. I'll submit separate pull-requests.
@poussa saw it next to me :)

@yongkang
Copy link

@luxtella Great work!

@ininallen
Copy link
Author

This issue is still able to be reproduced on Tizen build 1.29.5

@takethathe
Copy link
Contributor

#570 will solve this issue, but I'm afraid it will not be merged in a short time.

@ininallen
Copy link
Author

This issue is still able to be reproduced on 1.29.8

@baleboy
Copy link
Contributor

baleboy commented Oct 4, 2013

Please ensure this is fixed also on Crosswalk 1 beta branch

@ininallen
Copy link
Author

This issue is still able to be reproduced on beta 1.29.4.1

@ds-hwang
Copy link
Contributor

ds-hwang commented Oct 8, 2013

#570 is almost passed by Owner reviews. After build-bot is fixed and #570 is passed by build-bot, it will be landed to master branch.

Question: How can I apply #570 to beta 1? Who is beta 1 maintainer?

@darktears
Copy link
Contributor

@ds-hwang : just submit a PR targeting the branch.

@baleboy
Copy link
Contributor

baleboy commented Oct 11, 2013

@ds-hwang were you able to submit this to beta?

@ds-hwang
Copy link
Contributor

@baleboy not yet. commit-bot can not commit yet.

@ininallen
Copy link
Author

This issue is still able to be reproduced on canary build 1.29.13.0

@ds-hwang
Copy link
Contributor

It is merged to master. I'll land in beta 1 soon.

@ds-hwang
Copy link
Contributor

I submitted the fix to beta1. #879
I'll will be resolved soon.

@ds-hwang
Copy link
Contributor

It's done. @ininallen, Could you check again?

@ininallen
Copy link
Author

Still repros:
Latest W2 beta: 1.29.4.2
Latest Canary (Version 1): 1.29.13.0

@ds-hwang, Francesco said "ensure this is fixed also on Crosswalk 1 beta branch", so we have to re-test it on W3 beta.

@poussa
Copy link
Contributor

poussa commented Oct 18, 2013

@ininallen I tested on latest Canary (crosswalk-2.31.18.0-0.i586.rpm) and it works beautifully.

When you says Latest Canary, you should be using version 2.x images, right? But you are talking about 1.x images.

@ininallen
Copy link
Author

@poussa This issue is unable to be reproduced on Canary 2.31.19.0, I would close it, thanks for your comments

@baleboy
Copy link
Contributor

baleboy commented Oct 18, 2013

Let's close it when it's verified in Beta as well

@baleboy baleboy reopened this Oct 18, 2013
@ininallen
Copy link
Author

This bug has been migrated to JIRA, please track this issue in https://crosswalk-project.org/jira/browse/XWALK-35 . Thanks.

@ininallen
Copy link
Author

This issue is unable to be reproduced on Canary 2.31.19.0, but for Beta 1.29.4.3 we are unable to check it due to it is blocked by https://crosswalk-project.org/jira/browse/XWALK-46

@ininallen
Copy link
Author

Close it, please track it in jira

halton pushed a commit to halton/chromium-crosswalk that referenced this issue Nov 6, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
halton pushed a commit to halton/chromium-crosswalk that referenced this issue Nov 6, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
pozdnyakov pushed a commit to pozdnyakov/chromium-crosswalk that referenced this issue Nov 6, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
halton pushed a commit to halton/chromium-crosswalk that referenced this issue Nov 11, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
halton pushed a commit to halton/chromium-crosswalk that referenced this issue Nov 12, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
halton pushed a commit to halton/chromium-crosswalk that referenced this issue Nov 13, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
halton pushed a commit to halton/chromium-crosswalk that referenced this issue Nov 13, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
halton pushed a commit to halton/chromium-crosswalk that referenced this issue Nov 13, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
halton pushed a commit to halton/chromium-crosswalk that referenced this issue Nov 14, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
jeez pushed a commit to crosswalk-project/chromium-crosswalk that referenced this issue Nov 22, 2013
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants