Post Reply 
Ghost apps? Symbolic views that just won't go away.
06-29-2020, 06:29 AM
Post: #21
RE: Ghost apps? Symbolic views that just won't go away.
Hello,

The calculator will perform a FS flush when you turn the calc off to make sure buffers are written out.

I doubt that flash bit changes are the cause, especially as the flash has a heavy error correction code (can correct up to 4 bad bit per 512 and detect a further 4 if I remember well).

The only thing that could, in theory cause the problem would be a crash/reboot after a delete as the FS would not flush at that point.

I did spend quite a bit of time on all that and could never find the issue.

The underlying OS is NOT chineese quality. This was prime G1. As was made evident by the bug in realloc which, for a while caused instability until I was able to find and prove that it was wrongly implemented*
The G2 uses FReeRtos.

Cyrille

*The giest of it is that a malloc would take 16 bytes minimum, with 8 bites allocated for the data. 8 bytes (header) was a doubely linked list of memory blocks, and, upon a (free) 8 bytes (formally data) was used as a doubly linked list of freed blocks.
So, allocate 20 bytes, the system would allocate 8+20=28 bytes. All good so far.
Then, do a realloc to REDUCE the block size to 4, the system WOULD do it, reducing the block to 8+4, and creating a new free block (16 bytes) with the freed space. (which is the core of the bug). Now, allocate 4 or 8 bytes. It would use the newly freed block, allocating all 16 bytes (minimum space). Now, free your original block (which is now only 8+4 bytes long), and it would write the freed block list, overriding the header of the 2nd block -> crash!
Took me 2 month of work, reverse engineering the malloc scheme (I did not have the sources) and building test cases to prove to the ODM that they was such a critical bug in their trusted OS that they had used for over 15 years on millions of products :-)

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
06-29-2020, 08:50 AM
Post: #22
RE: Ghost apps? Symbolic views that just won't go away.
(06-29-2020 06:29 AM)cyrille de brébisson Wrote:  Hello,

The calculator will perform a FS flush when you turn the calc off to make sure buffers are written out.

I doubt that flash bit changes are the cause, especially as the flash has a heavy error correction code (can correct up to 4 bad bit per 512 and detect a further 4 if I remember well).

The only thing that could, in theory cause the problem would be a crash/reboot after a delete as the FS would not flush at that point.

I did spend quite a bit of time on all that and could never find the issue.

The underlying OS is NOT chineese quality. This was prime G1. As was made evident by the bug in realloc which, for a while caused instability until I was able to find and prove that it was wrongly implemented*
The G2 uses FReeRtos.

Cyrille

*The giest of it is that a malloc would take 16 bytes minimum, with 8 bites allocated for the data. 8 bytes (header) was a doubely linked list of memory blocks, and, upon a (free) 8 bytes (formally data) was used as a doubly linked list of freed blocks.
So, allocate 20 bytes, the system would allocate 8+20=28 bytes. All good so far.
Then, do a realloc to REDUCE the block size to 4, the system WOULD do it, reducing the block to 8+4, and creating a new free block (16 bytes) with the freed space. (which is the core of the bug). Now, allocate 4 or 8 bytes. It would use the newly freed block, allocating all 16 bytes (minimum space). Now, free your original block (which is now only 8+4 bytes long), and it would write the freed block list, overriding the header of the 2nd block -> crash!
Took me 2 month of work, reverse engineering the malloc scheme (I did not have the sources) and building test cases to prove to the ODM that they was such a critical bug in their trusted OS that they had used for over 15 years on millions of products :-)

Inconceivable!
- -
VP
Find all posts by this user
Quote this message in a reply
08-03-2020, 08:26 PM
Post: #23
RE: Ghost apps? Symbolic views that just won't go away.
I'd like to bump this thread again. Has the underlying issue been resolved or at least identified?

Cemetech | YouTube
Visit this user's website Find all posts by this user
Quote this message in a reply
08-04-2020, 01:41 PM
Post: #24
RE: Ghost apps? Symbolic views that just won't go away.
I guess Cyrille would have told us.

Fun story about the buggy realloc, there should be an issue of that kind in YAFFS or in the OS, but probably related to some of the hardware modifications.

It reminds me another story, I think it’s true (confirmed by Wikipedia): the first flight of the rocket Ariane V, which was strongly mediatized, was a fail and ended by the destruction of the rocket.
After a complete analysis, they found that the reason of the fail was an integer overflow in the inertial unit software. They did not expect any bug in this part of the software because it was an old piece of code used without any failure with Ariane IV. For Ariane IV, the inertial unit of the concerned stage was used a certain amount of seconds. But Ariane V being much more powerful they planned to use the same stage during a much longer time. The program was late, but being mediatized they did not want to postpone the first launch. The testing strategy was limited to new components and basic tests, and everybody trusted the code of the old inertial unit. Being used longer than in the previous configuration, the overflow appeared, and was not well interpreted by the central unit, leading to confusion of the orientation of the rocket and, finally, disintegration.
The flight was not carrying humans, and nobody was injured, excepted the pride of the engineers.
I was young at the time and did not work for the Arianespace company, but since this day I don’t accept any software to be committed to production without a 99,9% testings cover. Thanks to TDD this is now highly facilitated.

Thibault - not collector but in love with the few HP models I own - Also musician : http://walruspark.co
Find all posts by this user
Quote this message in a reply
10-24-2020, 11:53 AM
Post: #25
RE: Ghost apps? Symbolic views that just won't go away.
Previously, I had the same problem.But recently, the problem has suddenly disappeared.So I thought back to the action I had done.It seems to have something to do with creating a new backup and restoring it after I entered the "memory Manager" interface, since these are the only two actions I've done recently.Who can try it? Backup first, restore later.Then long press Shift +on and boot test to see if the problem still exists.
Find all posts by this user
Quote this message in a reply
10-30-2020, 03:00 PM
Post: #26
RE: Ghost apps? Symbolic views that just won't go away.
(10-24-2020 11:53 AM)cloudxff Wrote:  Previously, I had the same problem.But recently, the problem has suddenly disappeared.So I thought back to the action I had done.It seems to have something to do with creating a new backup and restoring it after I entered the "memory Manager" interface, since these are the only two actions I've done recently.Who can try it? Backup first, restore later.Then long press Shift +on and boot test to see if the problem still exists.

Followed your approach -> problem does not exist any more.

THX
Find all posts by this user
Quote this message in a reply
11-03-2020, 11:25 AM
Post: #27
RE: Ghost apps? Symbolic views that just won't go away.
(10-30-2020 03:00 PM)Stefan_Titan2944A Wrote:  
(10-24-2020 11:53 AM)cloudxff Wrote:  Previously, I had the same problem.But recently, the problem has suddenly disappeared.So I thought back to the action I had done.It seems to have something to do with creating a new backup and restoring it after I entered the "memory Manager" interface, since these are the only two actions I've done recently.Who can try it? Backup first, restore later.Then long press Shift +on and boot test to see if the problem still exists.

Followed your approach -> problem does not exist any more.

THX

I'm glad to help you and learn from each other
Find all posts by this user
Quote this message in a reply
04-02-2021, 07:06 AM
Post: #28
RE: Ghost apps? Symbolic views that just won't go away.
(10-24-2020 11:53 AM)cloudxff Wrote:  Previously, I had the same problem.But recently, the problem has suddenly disappeared.So I thought back to the action I had done.It seems to have something to do with creating a new backup and restoring it after I entered the "memory Manager" interface, since these are the only two actions I've done recently.Who can try it? Backup first, restore later.Then long press Shift +on and boot test to see if the problem still exists.

It doesn't seem to work for me, but maybe I'm performing the steps wrong, here's what I did...

1. I factory reset my device using the FCO method.
2. I then connected to my windows 10 pc and backed up my factory new image using the connectivity kit, naming the backup Clean.zip.
3. I then disconnected from my pc and factory reset my device again using the FCO method.
4. I long pressed shift+on to put the device into coma mode and then pressed on again to start the device.
5. I finally connected to my windows 10 pc again and restored my earlier backup (Clean.zip) using the connectivity kit.

6. I then disconnected from my pc and created a new app based on the solve app which I named solve1, which had a solve icon.
7. I then deleted the newly created solve1 app.
8. I repeated the coma restart by long pressing shift+on to put the device into coma mode and then pressing on again to start the device.

9. The result was that a ghost solve1 app appears with a function icon.

So it didn't work for me. Please tell me if I performed the steps wrong. I don't know what boot test is so maybe I am doing something wrong. Also maybe I should be backing up an image where I have deleted a ghost app first.

Another bug I've noticed is that the device won't go to sleep after a factory reset until I've restarted the device (in this case I used a coma restart followed by on+symb restart, but I don't know if that matters), at which point it will go to sleep. The device dims but after 5 minutes the screen becomes bright again instead of going to sleep. However, as mentioned, this is no longer a problem once the device has been restarted.

Regards, Frank
Find all posts by this user
Quote this message in a reply
05-11-2021, 12:54 AM
Post: #29
RE: Ghost apps? Symbolic views that just won't go away.
(10-24-2020 11:53 AM)cloudxff Wrote:  Previously, I had the same problem.But recently, the problem has suddenly disappeared.So I thought back to the action I had done.It seems to have something to do with creating a new backup and restoring it after I entered the "memory Manager" interface, since these are the only two actions I've done recently.Who can try it? Backup first, restore later.Then long press Shift +on and boot test to see if the problem still exists.

THANK YOU, THANK YOU, THANK YOU!! That worked for me. This issue had been vexing me for ages!


(04-02-2021 07:06 AM)juuce79 Wrote:  
(10-24-2020 11:53 AM)cloudxff Wrote:  Previously, I had the same problem.But recently, the problem has suddenly disappeared.So I thought back to the action I had done.It seems to have something to do with creating a new backup and restoring it after I entered the "memory Manager" interface, since these are the only two actions I've done recently.Who can try it? Backup first, restore later.Then long press Shift +on and boot test to see if the problem still exists.

It doesn't seem to work for me, but maybe I'm performing the steps wrong, here's what I did...

1. I factory reset my device using the FCO method.
2. I then connected to my windows 10 pc and backed up my factory new image using the connectivity kit, naming the backup Clean.zip.
3. I then disconnected from my pc and factory reset my device again using the FCO method.
4. I long pressed shift+on to put the device into coma mode and then pressed on again to start the device.
5. I finally connected to my windows 10 pc again and restored my earlier backup (Clean.zip) using the connectivity kit.

6. I then disconnected from my pc and created a new app based on the solve app which I named solve1, which had a solve icon.
7. I then deleted the newly created solve1 app.
8. I repeated the coma restart by long pressing shift+on to put the device into coma mode and then pressing on again to start the device.

9. The result was that a ghost solve1 app appears with a function icon.

So it didn't work for me. Please tell me if I performed the steps wrong. I don't know what boot test is so maybe I am doing something wrong. Also maybe I should be backing up an image where I have deleted a ghost app first.

Another bug I've noticed is that the device won't go to sleep after a factory reset until I've restarted the device (in this case I used a coma restart followed by on+symb restart, but I don't know if that matters), at which point it will go to sleep. The device dims but after 5 minutes the screen becomes bright again instead of going to sleep. However, as mentioned, this is no longer a problem once the device has been restarted.

Regards, Frank

You're doing a very different procedure, in that you're doing a backup to PC, which probably uses a very different mechanism.

This is what cloudxff meant -- at least, it's what worked for me:
1. Delete the zombie apps from the Apps screen (arrow keys to select the app, press Backspace, then tap OK).
2. Press Shift+Toolbox to open the Memory Manager.
3. Select Backups, then tap View.
4. Tap New, edit the name if you want, then tap OK to create a new backup on the calculator.
5. Select the backup you just created.
6. Tap Restore, then swipe the lock icon to the right to confirm.
7. (Optional) Tap Delete, then OK, to delete the backup.

Done!

Now you can test rebooting it and see if the zombie apps come back. For me, they do not.
Find all posts by this user
Quote this message in a reply
11-28-2022, 08:03 PM
Post: #30
RE: Ghost apps? Symbolic views that just won't go away.
(05-11-2021 12:54 AM)tooki Wrote:  
(10-24-2020 11:53 AM)cloudxff Wrote:  Previously, I had the same problem.But recently, the problem has suddenly disappeared.So I thought back to the action I had done.It seems to have something to do with creating a new backup and restoring it after I entered the "memory Manager" interface, since these are the only two actions I've done recently.Who can try it? Backup first, restore later.Then long press Shift +on and boot test to see if the problem still exists.

THANK YOU, THANK YOU, THANK YOU!! That worked for me. This issue had been vexing me for ages!


(04-02-2021 07:06 AM)juuce79 Wrote:  It doesn't seem to work for me, but maybe I'm performing the steps wrong, here's what I did...

1. I factory reset my device using the FCO method.
2. I then connected to my windows 10 pc and backed up my factory new image using the connectivity kit, naming the backup Clean.zip.
3. I then disconnected from my pc and factory reset my device again using the FCO method.
4. I long pressed shift+on to put the device into coma mode and then pressed on again to start the device.
5. I finally connected to my windows 10 pc again and restored my earlier backup (Clean.zip) using the connectivity kit.

6. I then disconnected from my pc and created a new app based on the solve app which I named solve1, which had a solve icon.
7. I then deleted the newly created solve1 app.
8. I repeated the coma restart by long pressing shift+on to put the device into coma mode and then pressing on again to start the device.

9. The result was that a ghost solve1 app appears with a function icon.

So it didn't work for me. Please tell me if I performed the steps wrong. I don't know what boot test is so maybe I am doing something wrong. Also maybe I should be backing up an image where I have deleted a ghost app first.

Another bug I've noticed is that the device won't go to sleep after a factory reset until I've restarted the device (in this case I used a coma restart followed by on+symb restart, but I don't know if that matters), at which point it will go to sleep. The device dims but after 5 minutes the screen becomes bright again instead of going to sleep. However, as mentioned, this is no longer a problem once the device has been restarted.

Regards, Frank

You're doing a very different procedure, in that you're doing a backup to PC, which probably uses a very different mechanism.

This is what cloudxff meant -- at least, it's what worked for me:
1. Delete the zombie apps from the Apps screen (arrow keys to select the app, press Backspace, then tap OK).
2. Press Shift+Toolbox to open the Memory Manager.
3. Select Backups, then tap View.
4. Tap New, edit the name if you want, then tap OK to create a new backup on the calculator.
5. Select the backup you just created.
6. Tap Restore, then swipe the lock icon to the right to confirm.
7. (Optional) Tap Delete, then OK, to delete the backup.

Done!

Now you can test rebooting it and see if the zombie apps come back. For me, they do not.

Exactly, thanks for the data, the procedure can be done and it works correctly, the zombie apps no longer appear
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)