public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1001732] New: fs-ecos bug/assertion
@ 2013-01-18 17:14 bugzilla-daemon
  2013-01-18 17:19 ` [Bug 1001732] " bugzilla-daemon
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: bugzilla-daemon @ 2013-01-18 17:14 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001732

           Summary: fs-ecos bug/assertion
           Product: eCos
           Version: unknown
          Platform: nios2_stratix2_2s60_rohs_tseplus (Stratix II, TSE+
                    design)
        OS/Version: Nios II
            Status: UNCONFIRMED
          Severity: major
          Priority: low
         Component: Filesystem support
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: praveenrai@ge.com
                CC: ecos-bugs@ecos.sourceware.org
             Class: Advice Request


Created an attachment (id=2034)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=2034)
snapshot of debug window

Hi,
I have encountered an issue where opening a file in write mode with
O_WRONLY|O_CREAT|O_TRUNC flags set is causing the code in fs-ecos.c (function
jffs2_to_os_mode()) to hit BUG(). I have an onboard CFI flash and an offboard
SPI flash. The problem is very intermittent and appears on both the flashes
(more often on SPI flash). So far I have been able to reproduce it by erasing
the SPI flash and then copying a file to it. The copy command sequence is as
follows:

copy->creat(destFile, filePermissions)->open( path, O_WRONLY | O_CREAT |
O_TRUNC, mode )->jffs2_open()->jffs2_truncate_file(uint32_t osmode).

When the error happens the argument osmode is either 0 or 10. In normal case
osmode is usually 0x16F0008 or 0x16F0001. I have attached snapshot of nios
debugger here for reference. 

Kindly let me know what could be the potential issue or areas to look at.
Appreciate your help.

Thanks,
Praveen

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1001732] fs-ecos bug/assertion
  2013-01-18 17:14 [Bug 1001732] New: fs-ecos bug/assertion bugzilla-daemon
@ 2013-01-18 17:19 ` bugzilla-daemon
  2013-01-24 17:09 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2013-01-18 17:19 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001732

praveenrai@ge.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|low                         |high
                 CC|                            |praveenrai@ge.com

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1001732] fs-ecos bug/assertion
  2013-01-18 17:14 [Bug 1001732] New: fs-ecos bug/assertion bugzilla-daemon
  2013-01-18 17:19 ` [Bug 1001732] " bugzilla-daemon
@ 2013-01-24 17:09 ` bugzilla-daemon
  2013-01-25  1:35 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2013-01-24 17:09 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001732

--- Comment #1 from praveenrai@ge.com 2013-01-24 17:08:45 GMT ---
Able to reproduce the issue at will by a) Booting the system with correct node
and files b) Erasing the flash c) Copying file to flash. 
Step (c) above results in BUG(). What these steps translate to is that if
metadata is missing (with node present) the jffs2_open function is not able to
get the right mode. If the mode is not right we hit the BUG().

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1001732] fs-ecos bug/assertion
  2013-01-18 17:14 [Bug 1001732] New: fs-ecos bug/assertion bugzilla-daemon
  2013-01-18 17:19 ` [Bug 1001732] " bugzilla-daemon
  2013-01-24 17:09 ` bugzilla-daemon
@ 2013-01-25  1:35 ` bugzilla-daemon
  2013-01-25 15:29 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2013-01-25  1:35 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001732

Bernd Edlinger <bernd.edlinger@hotmail.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.edlinger@hotmail.de

--- Comment #2 from Bernd Edlinger <bernd.edlinger@hotmail.de> 2013-01-25 01:35:01 GMT ---
Hello Praveen,

(In reply to comment #1)
> Able to reproduce the issue at will by a) Booting the system with correct node
> and files b) Erasing the flash c) Copying file to flash. 
> Step (c) above results in BUG(). What these steps translate to is that if
> metadata is missing (with node present) the jffs2_open function is not able to
> get the right mode. If the mode is not right we hit the BUG().

why do you not unmount the jffs2 before erasing,
then re-mount and then copy your file?


Regards,
Bernd.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1001732] fs-ecos bug/assertion
  2013-01-18 17:14 [Bug 1001732] New: fs-ecos bug/assertion bugzilla-daemon
                   ` (2 preceding siblings ...)
  2013-01-25  1:35 ` bugzilla-daemon
@ 2013-01-25 15:29 ` bugzilla-daemon
  2013-01-26 18:16 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2013-01-25 15:29 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001732

--- Comment #3 from praveenrai@ge.com 2013-01-25 15:28:21 GMT ---
Hi Bernd,

I am just trying to reproduce what we are seeing in field. I doubt that these
steps can happen in normal scenario but we are hitting BUG() in
jffs2_truncate_file(uint32_t osmode) on some of the field units. 

Would you agree to my conclusion that this assertion can happen if a ) metadata
is missing/corrupted OR b) mount operation fails? If not, what are the possible
root causes for something like this to happen?

Thanks,
Praveen

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1001732] fs-ecos bug/assertion
  2013-01-18 17:14 [Bug 1001732] New: fs-ecos bug/assertion bugzilla-daemon
                   ` (3 preceding siblings ...)
  2013-01-25 15:29 ` bugzilla-daemon
@ 2013-01-26 18:16 ` bugzilla-daemon
  2013-01-26 21:44 ` bugzilla-daemon
  2013-01-27  3:07 ` bugzilla-daemon
  6 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2013-01-26 18:16 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001732

--- Comment #4 from Bernd Edlinger <bernd.edlinger@hotmail.de> 2013-01-26 18:15:32 GMT ---
Hi Praveen,

somehow on my fs-ecos.c the line numbers are different than on yours.

But when I interpret it right what happens here, this might have happened:

The file system traverses a directory entry, and the metadata on the
flash are changed which points to an uninitialized inode.
When the invalid data are hit, the BUG is raised. Probably that should
have happened earlier...

IF your flash changes its contents when the file system is mounted,
the file system may fail. Especially if a flash is removed and
another flash inserted, you should unmount the file system when the
flash is removed, and re-mount the file system again, when the flash
is inserted again.

Once the file system has validated the flash content, the flash
should never be changed without the file system knowing that.


Regards,
Bernd.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1001732] fs-ecos bug/assertion
  2013-01-18 17:14 [Bug 1001732] New: fs-ecos bug/assertion bugzilla-daemon
                   ` (4 preceding siblings ...)
  2013-01-26 18:16 ` bugzilla-daemon
@ 2013-01-26 21:44 ` bugzilla-daemon
  2013-01-27  3:07 ` bugzilla-daemon
  6 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2013-01-26 21:44 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001732

--- Comment #5 from John Dallaway <john@dallaway.org.uk> 2013-01-26 21:43:48 GMT ---
Praveen, against which version of eCos are you reporting this bug?

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1001732] fs-ecos bug/assertion
  2013-01-18 17:14 [Bug 1001732] New: fs-ecos bug/assertion bugzilla-daemon
                   ` (5 preceding siblings ...)
  2013-01-26 21:44 ` bugzilla-daemon
@ 2013-01-27  3:07 ` bugzilla-daemon
  6 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2013-01-27  3:07 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001732

--- Comment #6 from praveenrai@ge.com 2013-01-27 03:07:10 GMT ---
(In reply to comment #5)
I think it's eCosPro 2.0.69 release.

Thanks
Praveen

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1001732] New: fs-ecos bug/assertion
@ 2013-01-18 17:14 bugzilla-daemon
  0 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2013-01-18 17:14 UTC (permalink / raw)
  To: ecos-bugs

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001732

           Summary: fs-ecos bug/assertion
           Product: eCos
           Version: unknown
          Platform: nios2_stratix2_2s60_rohs_tseplus (Stratix II, TSE+
                    design)
        OS/Version: Nios II
            Status: UNCONFIRMED
          Severity: major
          Priority: low
         Component: Filesystem support
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: praveenrai@ge.com
                CC: ecos-bugs@ecos.sourceware.org
             Class: Advice Request


Created an attachment (id=2034)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=2034)
snapshot of debug window

Hi,
I have encountered an issue where opening a file in write mode with
O_WRONLY|O_CREAT|O_TRUNC flags set is causing the code in fs-ecos.c (function
jffs2_to_os_mode()) to hit BUG(). I have an onboard CFI flash and an offboard
SPI flash. The problem is very intermittent and appears on both the flashes
(more often on SPI flash). So far I have been able to reproduce it by erasing
the SPI flash and then copying a file to it. The copy command sequence is as
follows:

copy->creat(destFile, filePermissions)->open( path, O_WRONLY | O_CREAT |
O_TRUNC, mode )->jffs2_open()->jffs2_truncate_file(uint32_t osmode).

When the error happens the argument osmode is either 0 or 10. In normal case
osmode is usually 0x16F0008 or 0x16F0001. I have attached snapshot of nios
debugger here for reference. 

Kindly let me know what could be the potential issue or areas to look at.
Appreciate your help.

Thanks,
Praveen

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-01-27  3:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-18 17:14 [Bug 1001732] New: fs-ecos bug/assertion bugzilla-daemon
2013-01-18 17:19 ` [Bug 1001732] " bugzilla-daemon
2013-01-24 17:09 ` bugzilla-daemon
2013-01-25  1:35 ` bugzilla-daemon
2013-01-25 15:29 ` bugzilla-daemon
2013-01-26 18:16 ` bugzilla-daemon
2013-01-26 21:44 ` bugzilla-daemon
2013-01-27  3:07 ` bugzilla-daemon
  -- strict thread matches above, loose matches on Subject: below --
2013-01-18 17:14 [Bug 1001732] New: " bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).