Closed Bug 1015487 Opened 6 years ago Closed 6 years ago

[ADB] all logging broken on b2g

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1014814

People

(Reporter: dmarcos, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

In todays build:

Gaia      b61129780e085636d09406f2a46e922d0f8b9757
Gecko     https://hg.mozilla.org/mozilla-central/rev/e9b2b72f4e6c
BuildID   20140523040203
Version   32.0a1

Logging don't show up anymore on adb logcat

I can reproduce on Nexus 4 and flame.
Some of my code calls __android_log_print and that's not showing up either.
This seems to be caused as a side-effect of bug 908503.

That bug causes logd_write.c to be statically linked into lubxul.so

media/libstagefright/system/core/liblog/logd_write.c

Furthermore, media/libstagefright/moz.build contains the line:
DEFINES['FAKE_LOG_DEVICE'] = True

This, in turn causes media/libstagefright/system/core/liblog/fake_log_device.c to be used which directs all of the log messages that used to goto logcat to now goto stderr.

You can see this if you do:

adb shell stop b2g
adb shell /system/bin/b2g.sh
Blocks: 908503
No longer blocks: 908503
Depends on: 908503
I think you should remove the liblog files from SOURCES and UNIFIED_SOURCES on Android and gonk builds.
That sounds like a more reasonable approach. I'll rework my patch to fix it that way.

There is a bunch of other core code which I personally think should NOT be included in libxul.so for gonk (and probably for android):

From SOURCES:
    'system/core/libutils/RefBase.cpp',
    'system/core/libutils/String16.cpp',
    'system/core/libutils/String8.cpp',
    'system/core/libutils/VectorImpl.cpp',

From UNIFIED SOURCES:
    'system/core/libcutils/strdup16to8.c',
    'system/core/libutils/SharedBuffer.cpp',
    'system/core/libutils/Static.cpp',
    'system/core/libutils/Unicode.cpp',

I was going to get muw's opinion on libstagefright itself. What is something in libstagefright changes between ICS/JB/KK, then we'll have bad code in libxul.so
Attachment #8428190 - Attachment is obsolete: true
Attachment #8428190 - Flags: review?(cpearce)
Attachment #8428201 - Flags: review?(cpearce)
Comment on attachment 8428201 [details] [diff] [review]
Rework as per glandium's suggestions

Review of attachment 8428201 [details] [diff] [review]:
-----------------------------------------------------------------

::: media/libstagefright/moz.build
@@ +75,5 @@
>      'system/core/libutils/Static.cpp',
>      'system/core/libutils/Unicode.cpp',
>  ]
>  
> +if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':

can be written as if CONFIG['MOZ_WIDGET_TOOLKIT'] not in ('gonk', 'android'):
blocking-b2g: --- → 2.0?
Keywords: regression
Component: General → Video/Audio
Product: Firefox OS → Core
Summary: [ADB] console.log not showing up on adb logcat → [ADB] all logging broken on b2g
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1014814
blocking-b2g: 2.0? → ---
Comment on attachment 8428201 [details] [diff] [review]
Rework as per glandium's suggestions

Review of attachment 8428201 [details] [diff] [review]:
-----------------------------------------------------------------

Looks like this is being solved in bug 1014814.
Attachment #8428201 - Flags: review?(cpearce)
You need to log in before you can comment on or make changes to this bug.