Ticket #2279 (new defect)

Opened 10 years ago

Last modified 2 years ago

toggling backlight very fast blocks reads of /proc/apm

Reported by: lindi Owned by: openmoko-kernel
Priority: normal Milestone:
Component: kernel Version: unspecified
Severity: minor Keywords: kernel backlight DoS
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible: always


Steps to reproduce:
1) Start "while cat /proc/apm; do sleep 1; done" in one terminal
2) Start
while true; do

echo 255 > /sys/class/backlight/gta02-bl/brightness
echo 15 > /sys/class/backlight/gta02-bl/brightness

in another terminal

Expected results:
2) backlight brightness changes very fast but cat is still sometimes scheduled and can read from /proc/apm

Actual results:
2) backlight brightness changes very fast but the read() to /proc/apm never returns.

More info:
1) I was just trying to make freerunner work as a strobe light when I noticed that I could not stop the program. This probably happened because Xorg was stuck reading from some file and would never succeed.
2) I am using andy-tracking 9ecc089861ab238e

Change History

comment:1 Changed 10 years ago by PaulFertser

Should we still care about it? APM is deprecated long time ago, as to the suspend/resume hooks (/etc/apm.d), that's probably userspace issues, no?

comment:2 Changed 10 years ago by lindi

Well, my window manager (icewm) supports /proc/apm and I got very upset when I suddenly noticed that it got stuck when I started the blinking program :-)

Anyways, I tried reading other files in /proc and noticed that also reading from /proc/driver/rtc seems to block forever. This probably suggests that the problem is not APM related?

comment:3 Changed 10 years ago by lindi

I wrote a small program that tries to read every file in /sys:

find /sys -type f | while read f; do
    echo "==== $f"
    md5sum $f &
    for i in 0 1 2 3 4 5 6 7 8 9; do
        if ! [ -d "/proc/$pid" ]; then
        sleep 0.1
    if [ -d "/proc/$pid" ]; then
        echo stuck on $f
        sleep 4

It reported that the following files can not be read when the backlight blinking program is running:


After the last file the phone rebooted with watchdog and ramconsole showed the following kernel

 Unable to handle kernel NULL pointer dereference at virtual address 00000000
 pgd = c7b18000
 [00000000] *pgd=37bb1031, *pte=00000000, *ppte=00000000
 Internal error: Oops: 17 [#1] PREEMPT
 Modules linked in: fuse snd_soc_neo1973_gta02_wm8753 snd_soc_s3c24xx_i2s snd_soc_s3c24xx g_ether s3c2410_wdt ar6000 snd_soc_wm8753 s3cmci snd_soc_core snd_pcm snd_timer snd_page_alloc snd
 CPU: 0    Not tainted  (2.6.29-GTA02_lindi-andy-tracking-mokodev #17)
 PC is at s3c24xx_serial_show_clksrc+0x1c/0x30
 LR is at dev_attr_show+0x2c/0x4c
 pc : [<c019f85c>]    lr : [<c01a0408>]    psr: a0000013
 sp : c7b49ee0  ip : c7b49ef0  fp : c7b49eec
 r10: 00000000  r9 : 00001000  r8 : c7b49f78
 r7 : c03a2830  r6 : c7990ab4  r5 : c03a2680  r4 : c038bbb8
 r3 : 00000000  r2 : c7bb6000  r1 : 00001000  r0 : c7bb6000
 Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
 Control: c000717f  Table: 37b18000  DAC: 00000015
 Process md5sum (pid: 1750, stack limit = 0xc7b48268)
 Stack: (0xc7b49ee0 to 0xc7b4a000)
 9ee0: c7b49f04 c7b49ef0 c01a0408 c019f850 c038bbb8 c7bb7360 c7b49f4c c7b49f08 
 9f00: c00f1e30 c01a03ec c02ad038 c004b2a8 c7b568f4 c7b568f4 be8605dc c7bb7378 
 9f20: c01606d8 c7b302c0 be8605dc c7b49f78 00001000 c002f048 c7b48000 00000000 
 9f40: c7b49f74 c7b49f50 c00ad7ec c00f1d7c c7b49f74 c7b49f60 00000000 00000000 
 9f60: c7b302c0 00000003 c7b49fa4 c7b49f78 c00ad944 c00ad744 00000000 00000000 
 9f80: ffffffff 00000000 00017858 00000000 00017858 00001000 00000000 c7b49fa8 
 9fa0: c002eea0 c00ad908 00000000 00017858 00000003 be8605dc 00001000 00000000 
 9fc0: 00000000 00017858 00001000 00000003 00001000 be8618f4 00000002 00000101 
 9fe0: be8605dc be8605a0 400ad154 4010173c 60000010 00000003 00000000 00000000 
 [<c019f840>] (s3c24xx_serial_show_clksrc+0x0/0x30) from [<c01a0408>] (dev_attr_show+0x2c/0x4c)
 [<c01a03dc>] (dev_attr_show+0x0/0x4c) from [<c00f1e30>] (sysfs_read_file+0xc4/0x1c0)
  r5:c7bb7360 r4:c038bbb8
 [<c00f1d6c>] (sysfs_read_file+0x0/0x1c0) from [<c00ad7ec>] (vfs_read+0xb8/0x148)
 [<c00ad734>] (vfs_read+0x0/0x148) from [<c00ad944>] (sys_read+0x4c/0x7c)
  r7:00000003 r6:c7b302c0 r5:00000000 r4:00000000
 [<c00ad8f8>] (sys_read+0x0/0x7c) from [<c002eea0>] (ret_fast_syscall+0x0/0x2c)
  r6:00001000 r5:00017858 r4:00000000
 Code: e59030e4 e3a01a01 e513300c e1a00002 (e5933000) 
 ---[ end trace 247919efb6119d22 ]---
 s3c2410-wdt s3c2410-wdt: Unexpected close, not stopping watchdog
 Flash device refused suspend due to active operation (state 0)
 Restarting system.
 arch_reset: attempting watchdog reset

comment:4 Changed 2 years ago by JustDox

Finasteride 20mg <a href=http://cial1.xyz/cialis-20mg-price.php>Cialis 20mg Price</a> Buy Misoprostol Online Achat Cialis Generique Pas Cher En France <a href=http://cial1.xyz/buy-cheap-cialis.php>Buy Cheap Cialis</a> Cephalexin Dosage Puppy Amoxicillin Elixir <a href=http://cial1.xyz/viagra-cialis.php>Viagra Cialis</a> Fausse Couche Cytotec Et Consequences Cialis Mareos <a href=http://cial5mg.xyz/cheap-cialis-online.php>Cheap Cialis Online</a> Venta Cialis En Farmacias Viagra In Melbourne <a href=http://cial1.xyz/buy-cheap-cialis.php>Buy Cheap Cialis</a> Cephalexin And Pink Eye Silagra Online Kaufen <a href=http://cial5mg.xyz/cheap-cialis-online.php>Cheap Cialis Online</a> Levitra 20 Mg Efectos Secundarios Cytotec Et Cialis <a href=http://zol1.xyz/order-zoloft-tablets.php>Order Zoloft Tablets</a> Zithromax Used To Treat Levitra Paypal Accepted <a href=http://kama1.xyz/order-kamagra.php>Order Kamagra</a> Discount Prevacid Uses For Cephalexin 500 Mg <a href=http://priligy.ccrpdc.com/priligy-united-states.php>Priligy United States</a> Propecia Pills For Sale Canadian Drug Stores <a href=http://viag1.xyz/viagra-online-online.php>Viagra Online Online</a> Order Prevacid Otc Kamagra Naturel Pas Cher <a href=http://cial1.xyz/purchase-generic-cialis.php>Purchase Generic Cialis</a> Generic Inderal Without Prescription Buy Effexor Online Uk <a href=http://viag1.xyz/viagra-online-online.php>Viagra Online Online</a> Purchase Doxycycl Hyc 50 Mg Cytotec Et La Femme <a href=http://zol1.xyz/buy-cheap-zoloft.php>Buy Cheap Zoloft</a> Buy Amoxicillin Online Acheter Generique Cialis <a href=http://cial5mg.xyz/shop-cialis-online.php>Shop Cialis Online</a> Levitra Scaduto Fa Male Preis Viagra 50 Mg <a href=http://kama1.xyz>Buy Kamagra</a> Furosemide Mexico Buy Viagra From Canada <a href=http://antabuse.ccrpdc.com/antabuse-online-prices.php>Antabuse Online Prices</a> Discounted Viagra For Sale Best Place To Buy Furosemide Online <a href=http://cialis.ccrpdc.com/buy-tadalafil-online.php>Buy Tadalafil Online</a> Propecia Diabetes Dejar De Fumar Cialis Tadalista <a href=http://zol1.xyz/zoloft-online-no.php>Zoloft Online No</a> Overnight Stendra In Internet Shop Generic 1 Mg Propecia Finasteride <a href=http://prednisone.ccrpdc.com/order-deltasone-online.php>Order Deltasone Online</a> Levitra Parafarmacia Amoxicillin 500 Mg For Sale <a href=http://cial1.xyz/buy-online-cialis.php>Buy Online Cialis</a> Provera Want To Buy Cialis Super Active Generique 20 Mg <a href=http://zol1.xyz/cheap-zoloft.php>Cheap Zoloft</a> Diclofenac Generic Name Generic Progesterone Menopause Mastercard Accepted Price Online <a href=http://cial1.xyz/where-to-order-cialis.php>Where To Order Cialis</a> Online Pharmacies To Avoid Comprar Levitra Farmacias Andorra <a href=http://viag1.xyz/best-viagra-online.php>Best Viagra Online</a> Lisinopril From India Pharmacy Brand Viagra For Sale Canadian Pharmacy <a href=http://accutane.ccrpdc.com/accutane-acne.php>Accutane Acne</a> Generic Sildenafil Capsules Ciprofloxacin Conservation <a href=http://cial1.xyz/cialis-cheap.php>Cialis Cheap</a> Viagra Tarif Prix Levitra Cialis Viagra Diferencias <a href=http://zol1.xyz/zoloft-fast-delivery.php>Zoloft Fast Delivery</a> Order Accutane Online Propecia Discount Card <a href=http://kama1.xyz/buying-kamagra-online.php>Buying Kamagra Online</a> Levitra Cialis Compared Amoxicillin 50 Mg Per Kg <a href=http://viag1.xyz/cheap-viagra-100mg.php>Cheap Viagra 100mg</a> Where Can I Buy Cyproheptadine Bupropion No Prescription <a href=http://cial1.xyz/cheap-cialis-online.php>Cheap Cialis Online</a> Cephalexin 500 Mg Sinus Infections Rosuvastatin Cheap <a href=http://zol1.xyz/zoloft-on-line.php>Zoloft On Line</a> Himcolin

Note: See TracTickets for help on using tickets.