* Bug?
@ 2016-07-06 14:02 Wjatscheslaw Stoljarski
2016-07-07 6:55 ` Bug? Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Wjatscheslaw Stoljarski @ 2016-07-06 14:02 UTC (permalink / raw)
To: Barebox List
Hi,
overwriting a file in barebox, didn't work properly.
---------------------- 8< -------------------------
unable to handle NULL pointer dereference at address 0x00000000
pc : [<2ff20f86>] lr : [<2ff20eff>]
sp : 2ffef808 ip : 201383fc fp : 00000000
r10: 2003cc94 r9 : 20138665 r8 : 00000269
r7 : 00000000 r6 : 1ff9a5d0 r5 : 00001fff r4 : 00000269
r3 : 00000000 r2 : 00001fff r1 : 00000000 r0 : 201383fc
Flags: Nzcv IRQs off FIQs off Mode SVC_32
[<2ff20f86>] (ramfs_read+0xba/0xc8) from [<2ff228d5>] (__read+0x41/0x58)
[<2ff228d5>] (__read+0x41/0x58) from [<2ff22f6f>] (read+0x2b/0x48)
[<2ff22f6f>] (read+0x2b/0x48) from [<2ff1ca31>] (copy_file+0x85/0x118)
[<2ff1ca31>] (copy_file+0x85/0x118) from [<2ff14ead>] (do_cp+0x109/0x128)
[<2ff14ead>] (do_cp+0x109/0x128) from [<2ff03209>] (execute_command+0x21/0x48)
[<2ff03209>] (execute_command+0x21/0x48) from [<2ff07443>] (run_list_real+0x56b/0x638)
[<2ff07443>] (run_list_real+0x56b/0x638) from [<2ff06da9>] (parse_stream_outer+0xd9/0x164)
[<2ff06da9>] (parse_stream_outer+0xd9/0x164) from [<2ff076d1>] (run_shell+0x31/0x60)
[<2ff076d1>] (run_shell+0x31/0x60) from [<2ff03209>] (execute_command+0x21/0x48)
[<2ff03209>] (execute_command+0x21/0x48) from [<2ff07443>] (run_list_real+0x56b/0x638)
[<2ff07443>] (run_list_real+0x56b/0x638) from [<2ff0715d>] (run_list_real+0x285/0x638)
[<2ff28519>] (unwind_backtrace+0x1/0x58) from [<2ff00cd1>] (panic+0x1d/0x2c)
[<2ff00cd1>] (panic+0x1d/0x2c) from [<2ff289bd>] (do_exception+0xd/0x10)
[<2ff289bd>] (do_exception+0xd/0x10) from [<2ff28a1d>] (do_data_abort+0x21/0x2c)
[<2ff28a1d>] (do_data_abort+0x21/0x2c) from [<2ff28714>] (do_abort_6+0x48/0x54)
---------------------- 8< -------------------------
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug?
2016-07-06 14:02 Bug? Wjatscheslaw Stoljarski
@ 2016-07-07 6:55 ` Sascha Hauer
2016-07-07 9:37 ` Bug? Wjatscheslaw Stoljarski
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2016-07-07 6:55 UTC (permalink / raw)
To: Wjatscheslaw Stoljarski; +Cc: Barebox List
Hi Wjatscheslaw,
On Wed, Jul 06, 2016 at 04:02:45PM +0200, Wjatscheslaw Stoljarski wrote:
> Hi,
>
> overwriting a file in barebox, didn't work properly.
I have never seen this. Can you reproduce this any maybe even have a
command sequence that fails? A quick 'cp' from one file to another
existing file did not show this problem.
Sascha
>
> ---------------------- 8< -------------------------
> unable to handle NULL pointer dereference at address 0x00000000
> pc : [<2ff20f86>] lr : [<2ff20eff>]
> sp : 2ffef808 ip : 201383fc fp : 00000000
> r10: 2003cc94 r9 : 20138665 r8 : 00000269
> r7 : 00000000 r6 : 1ff9a5d0 r5 : 00001fff r4 : 00000269
> r3 : 00000000 r2 : 00001fff r1 : 00000000 r0 : 201383fc
> Flags: Nzcv IRQs off FIQs off Mode SVC_32
> [<2ff20f86>] (ramfs_read+0xba/0xc8) from [<2ff228d5>] (__read+0x41/0x58)
> [<2ff228d5>] (__read+0x41/0x58) from [<2ff22f6f>] (read+0x2b/0x48)
> [<2ff22f6f>] (read+0x2b/0x48) from [<2ff1ca31>] (copy_file+0x85/0x118)
> [<2ff1ca31>] (copy_file+0x85/0x118) from [<2ff14ead>] (do_cp+0x109/0x128)
> [<2ff14ead>] (do_cp+0x109/0x128) from [<2ff03209>] (execute_command+0x21/0x48)
> [<2ff03209>] (execute_command+0x21/0x48) from [<2ff07443>] (run_list_real+0x56b/0x638)
> [<2ff07443>] (run_list_real+0x56b/0x638) from [<2ff06da9>] (parse_stream_outer+0xd9/0x164)
> [<2ff06da9>] (parse_stream_outer+0xd9/0x164) from [<2ff076d1>] (run_shell+0x31/0x60)
> [<2ff076d1>] (run_shell+0x31/0x60) from [<2ff03209>] (execute_command+0x21/0x48)
> [<2ff03209>] (execute_command+0x21/0x48) from [<2ff07443>] (run_list_real+0x56b/0x638)
> [<2ff07443>] (run_list_real+0x56b/0x638) from [<2ff0715d>] (run_list_real+0x285/0x638)
>
> [<2ff28519>] (unwind_backtrace+0x1/0x58) from [<2ff00cd1>] (panic+0x1d/0x2c)
> [<2ff00cd1>] (panic+0x1d/0x2c) from [<2ff289bd>] (do_exception+0xd/0x10)
> [<2ff289bd>] (do_exception+0xd/0x10) from [<2ff28a1d>] (do_data_abort+0x21/0x2c)
> [<2ff28a1d>] (do_data_abort+0x21/0x2c) from [<2ff28714>] (do_abort_6+0x48/0x54)
> ---------------------- 8< -------------------------
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug?
2016-07-07 6:55 ` Bug? Sascha Hauer
@ 2016-07-07 9:37 ` Wjatscheslaw Stoljarski
2016-07-07 10:07 ` Bug? Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Wjatscheslaw Stoljarski @ 2016-07-07 9:37 UTC (permalink / raw)
To: Sascha Hauer; +Cc: Barebox List
Hi Sascha,
I can reproduce this on barebox 2016.06.0 for example with:
cp /env/data/ansi-colors /env/data/
But "memcpy -s /env/data/ansi-colors -d /env/data/ansi-colors 0 0" works without problem.
I try this with next barebox version (2016.07.0). Maybe it's already fixed.
On Thu, Jul 07, 2016 at 08:55:45AM +0200, Sascha Hauer wrote:
> Hi Wjatscheslaw,
>
> On Wed, Jul 06, 2016 at 04:02:45PM +0200, Wjatscheslaw Stoljarski wrote:
> > Hi,
> >
> > overwriting a file in barebox, didn't work properly.
>
> I have never seen this. Can you reproduce this any maybe even have a
> command sequence that fails? A quick 'cp' from one file to another
> existing file did not show this problem.
>
> Sascha
>
>
> >
> > ---------------------- 8< -------------------------
> > unable to handle NULL pointer dereference at address 0x00000000
> > pc : [<2ff20f86>] lr : [<2ff20eff>]
> > sp : 2ffef808 ip : 201383fc fp : 00000000
> > r10: 2003cc94 r9 : 20138665 r8 : 00000269
> > r7 : 00000000 r6 : 1ff9a5d0 r5 : 00001fff r4 : 00000269
> > r3 : 00000000 r2 : 00001fff r1 : 00000000 r0 : 201383fc
> > Flags: Nzcv IRQs off FIQs off Mode SVC_32
> > [<2ff20f86>] (ramfs_read+0xba/0xc8) from [<2ff228d5>] (__read+0x41/0x58)
> > [<2ff228d5>] (__read+0x41/0x58) from [<2ff22f6f>] (read+0x2b/0x48)
> > [<2ff22f6f>] (read+0x2b/0x48) from [<2ff1ca31>] (copy_file+0x85/0x118)
> > [<2ff1ca31>] (copy_file+0x85/0x118) from [<2ff14ead>] (do_cp+0x109/0x128)
> > [<2ff14ead>] (do_cp+0x109/0x128) from [<2ff03209>] (execute_command+0x21/0x48)
> > [<2ff03209>] (execute_command+0x21/0x48) from [<2ff07443>] (run_list_real+0x56b/0x638)
> > [<2ff07443>] (run_list_real+0x56b/0x638) from [<2ff06da9>] (parse_stream_outer+0xd9/0x164)
> > [<2ff06da9>] (parse_stream_outer+0xd9/0x164) from [<2ff076d1>] (run_shell+0x31/0x60)
> > [<2ff076d1>] (run_shell+0x31/0x60) from [<2ff03209>] (execute_command+0x21/0x48)
> > [<2ff03209>] (execute_command+0x21/0x48) from [<2ff07443>] (run_list_real+0x56b/0x638)
> > [<2ff07443>] (run_list_real+0x56b/0x638) from [<2ff0715d>] (run_list_real+0x285/0x638)
> >
> > [<2ff28519>] (unwind_backtrace+0x1/0x58) from [<2ff00cd1>] (panic+0x1d/0x2c)
> > [<2ff00cd1>] (panic+0x1d/0x2c) from [<2ff289bd>] (do_exception+0xd/0x10)
> > [<2ff289bd>] (do_exception+0xd/0x10) from [<2ff28a1d>] (do_data_abort+0x21/0x2c)
> > [<2ff28a1d>] (do_data_abort+0x21/0x2c) from [<2ff28714>] (do_abort_6+0x48/0x54)
> > ---------------------- 8< -------------------------
> >
> > _______________________________________________
> > barebox mailing list
> > barebox@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/barebox
> >
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug?
2016-07-07 9:37 ` Bug? Wjatscheslaw Stoljarski
@ 2016-07-07 10:07 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2016-07-07 10:07 UTC (permalink / raw)
To: Wjatscheslaw Stoljarski; +Cc: Barebox List
On Thu, Jul 07, 2016 at 11:37:38AM +0200, Wjatscheslaw Stoljarski wrote:
> Hi Sascha,
>
> I can reproduce this on barebox 2016.06.0 for example with:
> cp /env/data/ansi-colors /env/data/
> But "memcpy -s /env/data/ansi-colors -d /env/data/ansi-colors 0 0" works without problem.
>
> I try this with next barebox version (2016.07.0). Maybe it's already fixed.
Nope, it isn't.
So the problem comes when you copy a file over itself. This indeed
crashes here aswell. This points to a bug in the ramfs implementation
which should be fixed. Also there's another bug in 'cp': copy_file
should recognize when source and destination are the same file and
report an error in this case.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-07 10:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06 14:02 Bug? Wjatscheslaw Stoljarski
2016-07-07 6:55 ` Bug? Sascha Hauer
2016-07-07 9:37 ` Bug? Wjatscheslaw Stoljarski
2016-07-07 10:07 ` Bug? Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox