sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

Xperia X Android 8.1 can not establish stable RSAP connection #360

Closed XperiaDeveloper closed 4 years ago

XperiaDeveloper commented 5 years ago

Platform: Loire Device: Xperia X Kernel version: 4.4 Android version: 8.1.0-R52

Description Trying to connect the device with bluetooth RSAP to car. The bluetooth connection with the device is esablished. Then it asks for SIM PIN and then crashes. A dialog shows "unexpected failure".

Please see the attached log file. Error experienced between 8:14 and 8:15. log-vanilla-rsap.log

Symptoms Crashing bluetooth connection.

How to reproduce [As described in description]

jerpelea commented 5 years ago

please post the dmesg for the same bug

jerpelea commented 5 years ago

I tried to replicate the bug with my card but unfortunately I don't have RSAP

XperiaDeveloper commented 5 years ago

Here you will find the related dmesg log-vanilla-dmesg.log

jerpelea commented 5 years ago

Unfortunately the dmesg does not help can you increase verbosity in the BT HAL and try again

XperiaDeveloper commented 5 years ago

Hi, sorry for delay. I had no access to car with RSAP the whole last week.

Here you find the logs with more debugging. Time to try to connect was between 8:04-8:05.

log-vanilla-dmesg.log log-vanilla.log

oshmoun commented 5 years ago

can you please try with a kernel built with this commit checked out? https://github.com/sonyxperiadev/kernel/commit/823f674490e8352b4f0e4ac109ae5edf1b50ffb5

XperiaDeveloper commented 5 years ago

Hi, I tried with the kernel with the suggested commit. The RSAP connection works then fine :).

Could you point to some specific commits which could be eventually cherry-picked? (Currently we are on this commit: https://github.com/sonyxperiadev/kernel/commit/44235a04f24d81465c2d4ea0a7c46505b41601f8)

log-vanilla-dmesg.log log-vanilla-rsap.log

oshmoun commented 5 years ago

@XperiaDeveloper thanks for testing. there are no commits to pick, but you might be able to revert a set of commits to achieve what you want. I don't have such a list ready for you unfortunately. I've got to ask though, can you reliably trigger the issue currently? i.e does RSAP always fail immediately or does it sometimes successfully pairs for a while then suddenly fails while in use?

looping in @kholk so he now has the proof he wanted of the bt issue being related to clocks.

jerpelea commented 5 years ago

@XperiaDeveloper did you cherrypick that commit on top of your kernel or you built the kernel on that commit?

oshmoun commented 5 years ago

@jerpelea he did a checkout of that commit. Picking that commit changes nothing as it is already applied in the 4.4 branch

$ git cherry-pick 823f674
HEAD detached at sonyxperiadev/aosp/LA.UM.6.4.r1
You are currently cherry-picking commit 823f674490e8.

nothing to commit, working tree clean
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git reset'

EDIT: just occured to me that I didn't explain why that commit is significant. It is the direct parent of the merge commit that first introduced the porting of loire to mainline clocks https://github.com/sonyxperiadev/kernel/commit/5c03506735d856f57650cf92e26bf9f1b6e905b2

jerpelea commented 5 years ago

@oshmoun then we have more than 800 commits to bisect and find the regression @XperiaDeveloper can you checkout d363743c8506f72583636fc01b98db3891e1f1a5 to narrow the search

unfortunately you are the only one that has a car to test RSAP and we can not speedup the process

XperiaDeveloper commented 5 years ago

@XperiaDeveloper thanks for testing. there are no commits to pick, but you might be able to revert a set of commits to achieve what you want. I don't have such a list ready for you unfortunately.

Revert or cherry-pick should be both fine. I don't just want to move the kernel three months ahead, I'm afraid that some other components would not work then.

I've got to ask though, can you reliably trigger the issue currently? i.e does RSAP always fail immediately or does it sometimes successfully pairs for a while then suddenly fails while in use?

Always reliably failing after pairing.

looping in @kholk so he now has the proof he wanted of the bt issue being related to clocks.

XperiaDeveloper commented 5 years ago

@oshmoun then we have more than 800 commits to bisect and find the regression @XperiaDeveloper can you checkout d363743c8506f72583636fc01b98db3891e1f1a5 to narrow the search

unfortunately you are the only one that has a car to test RSAP and we can not speedup the process

I'll check that and give you feedback asap.

XperiaDeveloper commented 5 years ago

@oshmoun then we have more than 800 commits to bisect and find the regression @XperiaDeveloper can you checkout d363743c8506f72583636fc01b98db3891e1f1a5 to narrow the search

unfortunately you are the only one that has a car to test RSAP and we can not speedup the process

Using this commit the connection established but crashed after making a call. Do you need the logcat output for this case?

oshmoun commented 5 years ago

@XperiaDeveloper could you please test with this modification? https://github.com/sonyxperiadev/kernel/pull/1967 EDIT: not needed anymore

XperiaDeveloper commented 5 years ago

Any update on this issue. Last commit from "oshmoun" had no action for me. So could you isolate the relevant commits?

oshmoun commented 5 years ago

it's isolated alright the issue is caused by the switch of clock drivers it's not clear though how that switch caused this regression

kholk commented 5 years ago

@XperiaDeveloper I've just engineered a possible solution for this issue, thanks to @oshmoun isolating the producer to a specific clock.

Can you please test your RSAP connection again with this patchset? https://github.com/sonyxperiadev/kernel/pull/1985

Thanks!

XperiaDeveloper commented 5 years ago

Hi @kholk actually we need the patchset for Android 8 based on LA.6.4.1 (our last commit from Alin 44235a04). Your change is as I see based on LE.UM.2.3.2.r1.4 and the set could not be cherry-picked into our repo.

jerpelea commented 4 years ago

Deprecated Android version