Closed Bug 1033095 Opened 10 years ago Closed 6 years ago

Sending empty SMS messages causes AbortError

Categories

(Firefox OS Graveyard :: Gaia::Cost Control, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.0 affected)

RESOLVED WONTFIX
Tracking Status
b2g-v2.0 --- affected

People

(Reporter: cyang, Unassigned)

Details

(Whiteboard: [NaBfT])

Attachments

(3 files)

Very similar to bug 994819, I am seeing AbortError while running our test scripts which sends empty outgoing messages. Although I've been able to reproduce by sending non-empty SMS messages, it seems relatively more simple to reproduce by sending empty text messages only.

STR:
1) In a test script, send 5 empty SMS using mozMobileMessage
2) Repeat the test once or twice and AbortError should show up

07-01 16:44:26.603  2156  2156 E GeckoConsole: Content JS ERROR at app://costcontrol.gaiamobile.org/gaia_build_message_handler.js:417 in onInfo: Invalid getSegmentInfoForText() result. Counting 1 segment
07-01 16:44:27.123   231   231 I Gecko   : 1404258267134	Marionette	INFO	sendToClient: {"from":"0","error":{"message":"AbortError at:  line: 0","status":17}}, {934e94c1-fb2f-40fd-8d87-4cd8c981f996}, {934e94c1-fb2f-40fd-8d87-4cd8c981f996}
07-01 16:44:27.123   231  2301 E GeckoConsole: [JavaScript Error: "IndexedDB UnknownErr: IDBTransaction.cpp:870"]
Vicamo, with your change from bug 994819, AbortError is a lot harder to reproduce but seems like the empty MO case is still causing some trouble. Can we get your help on this again? Thanks!
Flags: needinfo?(vyang)
Don't quite sure how do you define "empty".  Sending messages with empty body string is not allowed by Messages app.  Sounds like the problem you have can never really happen.  Can't replicate on emulator with Marionette test cases, either.
Flags: needinfo?(vyang)
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #2)
> Don't quite sure how do you define "empty".  Sending messages with empty
> body string is not allowed by Messages app. Sounds like the problem you
> have can never really happen.

This was allowed by Gecko as resolved by bug 957084. The idea was that an empty SMS ('') can be sent to the operator to retrieve balance information. Our tests do this via Marionette test scripts. I never utilize the Message app for this.

>  Can't replicate on emulator with Marionette test cases, either.

The easiest way is to put this in a test script:

let number = '12345';
let test = '';
mozSms.send(number, text);

I just repeated the code above 5 times in my test script and then ran the script at least twice and easily see AbortError.

Vicamo, are there other logs that I can provide to you to help with debugging this issue?
Flags: needinfo?(vyang)
Here is the patch I used to send "" messages to 100 different receivers. No AbortError/UnknowError found due to SMS transactions.
Flags: needinfo?(vyang)
Looks like CostControl is actively developed by Marina recently.
Flags: needinfo?(mri)
Hi,
Sorry, I can't help you because I've never work with gecko and I don't know how to launch this test :S. Gecko is a big black hole for me. 

Regards
Flags: needinfo?(mri)
blocking-b2g: 2.0? → 2.0+
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #4)
> Created attachment 8449942 [details] [diff] [review]
> marionette_send-100-empty-body-sms.patch
> 
> Here is the patch I used to send "" messages to 100 different receivers. No
> AbortError/UnknowError found due to SMS transactions.
Vicamo, did you have cost control app running in the background when you ran this test.
Flags: needinfo?(vyang)
Afer talking with Marina, it seems that this failure is not happening in real life, it only raises when launching these marionette SMS stress tests in Gecko.

Cost control application has a listener for the sms-sent event and these tests are launching near 100 events at the same time so Cost Control app has to make many requests to the BBDD and it provokes that indexed error. But Cost Control app when sending a balance SMS, is designed to not allow sending another one so this scenario is not going to happen so I don’t think this bug should be 2.0+. 

Waiting for Vicamo to confirm it.
Re-nominating until Vicamo's confirmation.
blocking-b2g: 2.0+ → 2.0?
b2g-ps shows Usage app in action after those empty-body messages were sent. No AbortError or UnknownError shows in the log.
Flags: needinfo?(vyang)
(In reply to Carol Yang [:cyang] from comment #0)
> 07-01 16:44:26.603  2156  2156 E GeckoConsole: Content JS ERROR at
> app://costcontrol.gaiamobile.org/gaia_build_message_handler.js:417 in
> onInfo: Invalid getSegmentInfoForText() result. Counting 1 segment

Kind of off the topic, but I'm curious why we have this error. I think that should never happen, either.
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #10)
> Created attachment 8452931 [details] [diff] [review]
> gaia_send-100-empty-body-sms.patch

(In reply to Vicamo Yang [:vicamo][:vyang] from comment #12)
> (In reply to Carol Yang [:cyang] from comment #0)
> > 07-01 16:44:26.603  2156  2156 E GeckoConsole: Content JS ERROR at
> > app://costcontrol.gaiamobile.org/gaia_build_message_handler.js:417 in
> > onInfo: Invalid getSegmentInfoForText() result. Counting 1 segment
> 
> Kind of off the topic, but I'm curious why we have this error. I think that
> should never happen, either.

Apologies, if this is obvious and I am missing something, but I was still looking for a confirmation to comment #8 and vicamo's take on if this is a genuine issue something we should fix on 2.0.
Flags: needinfo?(vyang)
(In reply to bhavana bajaj [:bajaj] [NOT reading Bugmail, needInfo please] from comment #14)
> Apologies, if this is obvious and I am missing something, but I was still
> looking for a confirmation to comment #8 and vicamo's take on if this is a
> genuine issue something we should fix on 2.0.

Hi Bhavana,

In comment 8 Maria was to explain that CostControl sends empty message only once at any given time. There should not be "send 5 empty SMS using mozMobileMessage" under practical usage.

I cannot comment on this for the reason that I haven't really been working on CostControl, and I have little knowledge about all its implicit assumptions, real world constraints, etc..

All I did in comment 10 and comment 11 is to try replicating the reported failure in despite of that one-message-at-a-time constraint, make sure it just cannot happen anyway. Under a more extreme test case, I can still not replicate this case.

In summary, before further evidences/steps showing up, the STR should not happen in real world and neither can it be replicated in an emulated environment. Judging from the two points, I don't think there is a good reason to nominate this bug as a 2.0 blocker for the time being.
Flags: needinfo?(vyang)
triage: shouldn't block per comment 15 and comment 8.
blocking-b2g: 2.0? → ---
No longer blocks: CAF-v2.0-FC-metabug
Whiteboard: [NaBfT]
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: