Anope Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001455Anope Development (1.9.x series)Otherpublic2012-10-30 20:422012-11-30 10:56
ReporterCuttingEdge 
Assigned ToAdam 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSUbuntu LinuxOS Version10.04
Product Version 
Target VersionFixed in Version 
Summary0001455: Crash on invalid upstream MODE / SVSMODE
DescriptionI'm currently doing a bit of IRCd development by implementing a few of my own custom services for InspIRCd 2.0 that run alongside Anope.

If the service I'm coding on the network sends the following, Anope does not handle it correctly, and crashes:

:UID MODE #channel :+b *!*@host.com
:UID SVSMODE #channel :+b *!*@host.com

The modes are subsequently not propagated to the network (so I know my implementation is incorrect).

Either of the two above, are executed directly after using a SVSPART and SVSJOIN to move a user to an alternative channel in my current test.

Sending the following from the upstream server works, but Anope outputs a warning of sorts:

:UID MODE #channel +b *!*@host.com
:UID SVSMODE #channel +b *!*@host.com

Seeing the following in the Anope logs:

[Oct 30 20:00:26 2012] Received: :4SV000004 MODE #cuttingedge +b :*!*@atrum-60k.tqo.75.41.IP
[Oct 30 20:00:26 2012] MODE #cuttingedge *!*@atrum-60k.tqo.75.41.IP ts: +b
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char 6
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char 0
[Oct 30 20:00:26 2012] warning: Channel::SetModesInternal() recieved more modes requiring params than params, modes: *!*@atrum-60k.tqo.75.41.IP
[Oct 30 20:00:26 2012] Sent: :1SVAAAAAC PRIVMSG #atrum-services :warning: Channel::SetModesInternal() recieved more modes requiring params than params, modes: *!*@atrum-60k.tqo.75.41.IP
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char .
[Oct 30 20:00:26 2012] warning: Channel::SetModesInternal() recieved more modes requiring params than params, modes: *!*@atrum-60k.tqo.75.41.IP
[Oct 30 20:00:26 2012] Sent: :1SVAAAAAC PRIVMSG #atrum-services :warning: Channel::SetModesInternal() recieved more modes requiring params than params, modes: *!*@atrum-60k.tqo.75.41.IP
[Oct 30 20:00:26 2012] warning: Channel::SetModesInternal() recieved more modes requiring params than params, modes: *!*@atrum-60k.tqo.75.41.IP
[Oct 30 20:00:26 2012] Sent: :1SVAAAAAC PRIVMSG #atrum-services :warning: Channel::SetModesInternal() recieved more modes requiring params than params, modes: *!*@atrum-60k.tqo.75.41.IP
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char .
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char 7
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char 5
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char .
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char 4
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char 1
[Oct 30 20:00:26 2012] Channel::SetModeInternal: Unknown mode char .
[Oct 30 20:00:26 2012] warning: Channel::SetModesInternal() recieved more modes requiring params than params, modes: *!*@atrum-60k.tqo.75.41.IP
[Oct 30 20:00:26 2012] Sent: :1SVAAAAAC PRIVMSG #atrum-services :warning: Channel::SetModesInternal() recieved more modes requiring params than params, modes: *!*@atrum-60k.tqo.75.41.IP

Not too sure if you are the right group to be talking to about this. What would be the correct approach in my code be, so that it does not cause Anope to crash?

I'm using Anope 1.9.
Steps To ReproduceAnope receives the following from an upstream provider:

:UID MODE #channel :+b *!*@host.com
:UID SVSMODE #channel :+b *!*@host.com

The UID's are standard TS6-type variables used in InspIRCd 2.0.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0006305)
Adam (administrator)
2012-11-30 10:56

Closing due to inactivity. Reopen if you have debugging information regarding this crash.
(0006285)
Adam (administrator)
2012-10-30 21:26

For some reason our mode handler was expecting a timestamp, like how fmode works. http://anope.git.sourceforge.net/git/gitweb.cgi?p=anope/anope;a=commitdiff;h=1ef748038083e845af040ddc0b52ac27d2fe6753 [^]

I am interested in this crash you got though, the logs you show have warnings, but not a crash. Do you have a backtrace for this?

Also, the proper way to set modes on inspircd is like:

:sid FMODE #channel ts +nto adam

Where ts is the timestamp of the channel
(0006284)
Adam (administrator)
2012-10-30 21:09

Is this 1.9.7 or git? git has had a massive overhaul of everything protocol related so it is likely not a problem anymore.

- Issue History
Date Modified Username Field Change
2012-10-30 20:42 CuttingEdge New Issue
2012-10-30 21:09 Adam Note Added: 0006284
2012-10-30 21:26 Adam Note Added: 0006285
2012-11-30 10:56 Adam Note Added: 0006305
2012-11-30 10:56 Adam Status new => closed
2012-11-30 10:56 Adam Assigned To => Adam
2012-11-30 10:56 Adam Resolution open => fixed


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker